Skip to content

Conversation

achow101
Copy link
Member

@achow101 achow101 commented Jun 12, 2017

This PR is part of #10570. It also builds on top of #10571.

This PR splits signrawtransaction into two commands, signrawtransactionwithkey and signrawtransactionwithwallet. signrawtransactionwithkey requires private keys to be passed in and does not use the wallet for any signing. signrawtransactionwithwallet uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

The signrawtransaction RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

All tests that used signrawtransaction have been updated to use one of the two new RPCs. Most uses were changed to signrawtransactionwithwallet. These were changed via a scripted diff.

@sipa
Copy link
Member

sipa commented Jun 13, 2017

Incorrect scripted diff.

@achow101 achow101 force-pushed the split-signraw branch 2 times, most recently from 0b7c0c2 to 1283d87 Compare June 13, 2017 02:21
@jonasschnelli
Copy link
Contributor

I'm not entirely sure if this is a good long term strategy.
signrawtransactionwithwallet seems okay(ish) but I don't see a reason to pass around a private key (though RPC, TCP into the same process that runs the p2p/validation/node).

Where are the differences betweenbitcoin-tx's sign command and the here proposed signrawtransactionwithkey?
Wouldn't it make more sense to focus on bitcoin-tx for (offline) rawtx signing?

@achow101
Copy link
Member Author

@jonasschnelli signrawtransactionwithkey will lookup the UTXOs in order to sign whereas bitcoin-tx's `sign' command requires you to supply them. This is much easier to use.

@achow101 achow101 force-pushed the split-signraw branch 2 times, most recently from a1d577b to a15695a Compare June 19, 2017 18:16
@laanwj laanwj added this to the 0.15.0 milestone Jul 6, 2017
@achow101 achow101 force-pushed the split-signraw branch 3 times, most recently from 7725585 to 05c3cf5 Compare July 8, 2017 00:36
@laanwj
Copy link
Member

laanwj commented Jul 18, 2017

This has missed the 0.15 feature freeze, moving to 0.16.

@laanwj laanwj modified the milestones: 0.16.0, 0.15.0 Jul 18, 2017
@jnewbery
Copy link
Contributor

needs rebase

@achow101
Copy link
Member Author

rebased

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some review comments inline. It's a shame that this doesn't remove the server->wallet dependency, but it's a good first step in that direction.

I felt bad about asking you to rebase and then not actually reviewing before it got stale again, so I rebased it myself here: https://github.com/jnewbery/bitcoin/tree/pr10579 . Feel free to grab that branch if it helps.

@@ -95,6 +95,9 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "createrawtransaction", 3, "replaceable" },
{ "signrawtransaction", 1, "prevtxs" },
{ "signrawtransaction", 2, "privkeys" },
{ "signrawtransactionwithwallet", 1, "prevtxs" },
{ "signrawtransactionwithkey", 2, "prevtxs" },
{ "signrawtransactionwithkey", 1, "privkeys" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supernit: 1 usually comes before 2 :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnewbery for me it's more "Sort please" :trollface:

src/Makefile.am Outdated
@@ -132,6 +132,7 @@ BITCOIN_CORE_H = \
rpc/protocol.h \
rpc/server.h \
rpc/register.h \
rpc/rawtransaction.h \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the first commit (6fded798a77e8a754fa9455afd3328aee0842274)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and sorted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

following lines aren't sorted either, not sure if it matters to clean this up

@@ -74,7 +74,7 @@ def run_test(self):

# Use a different signature hash type to sign. This creates an equivalent but malleated clone.
# Don't send the clone anywhere yet
tx1_clone = self.nodes[0].signrawtransactionwithwallet(clone_raw, None, None, "ALL|ANYONECANPAY")
tx1_clone = self.nodes[0].signrawtransactionwithwallet(clone_raw, None, "ALL|ANYONECANPAY")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this change before the scripted diff commit (to not break git bisect). You could change the args to be named args while you're doing that.


# 1) The transaction has a complete set of signatures
assert 'complete' in rawTxSigned
assert_equal(rawTxSigned['complete'], True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for assert_equal(thing, True). Just use assert thing


# 3) The transaction has no complete set of signatures
assert 'complete' in rawTxSigned
assert_equal(rawTxSigned['complete'], False)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just use assert not thing

#ifdef ENABLE_WALLET
else if (request.params[2].isNull()) {
newRequest.params.push_back(request.params[0]);
newRequest.params.push_back(request.params[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: add a comment here to say that signrawtransactionwithwallet doesn't take a privkeys parameter.

return signtransaction(mtx, request.params[2], &keystore, true, request.params[3]);
}

UniValue signrawtransaction(const JSONRPCRequest& request)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps hide this RPC behind a deprecated command line argument (similar to #11031)

RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true);

CMutableTransaction mtx;
if (!DecodeHexTx(mtx, request.params[0].get_str(), true))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I know these are moves, but there's so few of them that you might as well add braces to the ifs.

RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VARR, UniValue::VARR, UniValue::VSTR}, true);

// Make a JSONRPCRequest to pass on to the right signrawtransaction* command
JSONRPCRequest newRequest;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: use snake_case for variables in new functions.

@@ -641,86 +641,13 @@ UniValue combinerawtransaction(const JSONRPCRequest& request)
return EncodeHexTx(mergedTx);
}

UniValue signrawtransaction(const JSONRPCRequest& request)
UniValue signtransaction(CMutableTransaction& mtx, const UniValue& prevTxsUnival, CBasicKeyStore *keystore, bool tempKeystore, const UniValue& hashType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: new function parameters should be snake_case

rawTxSigned = self.nodes[0].signrawtransactionwithkey(rawTx, privKeys, inputs)

# 1) The transaction has a complete set of signatures
assert 'complete' in rawTxSigned
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove key asserts since below you assert the value, which fail in case the key is not defined? cc @jnewbery.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. The line below should raise KeyError in that case.

/** Sign a transaction with the given keystore and previous transactions */
UniValue signtransaction(CMutableTransaction& mtx, const UniValue& prevTxs, CBasicKeyStore *keystore, bool tempKeystore, const UniValue& hashType);

#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#endif // BITCOIN_RPC_RAWTRANSACTION_H

#ifndef BITCOIN_RPC_RAWTRANSACTION_H
#define BITCOIN_RPC_RAWTRANSACTION_H

class CBasicKeyStore;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unknown types below: CMutableTransaction and UniValue.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not addressed in f5a3e0d4a3b4b359714b7d380d7784b7ca0524c0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. It must have gotten lost somewhere.

@@ -18,6 +18,7 @@
#include "policy/rbf.h"
#include "rpc/mining.h"
#include "rpc/server.h"
#include "rpc/rawtransaction.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sort.

@@ -888,6 +786,185 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
return result;
}

UniValue signrawtransactionwithkey(const JSONRPCRequest& request)
{

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove newline.


CBasicKeyStore keystore;
UniValue keys = request.params[1].get_array();
for (unsigned int idx = 0; idx < keys.size(); idx++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++idx.

if (!fGood)
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
CKey key = vchSecret.GetKey();
if (!key.IsValid())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Braces.

UniValue k = keys[idx];
CBitcoinSecret vchSecret;
bool fGood = vchSecret.SetString(k.get_str());
if (!fGood)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take the opportunity to kill fGood:

if (!vchSecret.SetString(k.get_str())) {

return signrawtransactionwithwallet(newRequest);
}
#endif
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else {

@@ -970,7 +1047,8 @@ static const CRPCCommand commands[] =
{ "rawtransactions", "decodescript", &decodescript, true, {"hexstring"} },
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, {"hexstring","allowhighfees"} },
{ "rawtransactions", "combinerawtransaction", &combinerawtransaction, true, {"txs"} },
{ "rawtransactions", "signrawtransaction", &signrawtransaction, false, {"hexstring","prevtxs","privkeys","sighashtype"} }, /* uses wallet if enabled */
{ "rawtransactions", "signrawtransaction", &signrawtransaction, true, {"hexstring","prevtxs","privkeys","sighashtype"} },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops, align this and above lines? 😞

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK d602348.

#define BITCOIN_RPC_RAWTRANSACTION_H

class CBasicKeyStore;
class CMutableTransaction;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, gives compiler warning:

In file included from rpc/rawtransaction.cpp:20:
./rpc/rawtransaction.h:9:1: warning: class 'CMutableTransaction' was previously declared as a struct [-Wmismatched-tags]
class CMutableTransaction;
^
./primitives/transaction.h:362:8: note: previous use is here
struct CMutableTransaction
       ^
./rpc/rawtransaction.h:9:1: note: did you mean struct here?
class CMutableTransaction;
^~~~~
struct

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this on my machine..

@jnewbery
Copy link
Contributor

reACK d602348

@sipa
Copy link
Member

sipa commented Feb 20, 2018

utACK d602348

@sipa sipa merged commit d602348 into bitcoin:master Feb 20, 2018
sipa added a commit that referenced this pull request Feb 20, 2018
…et RPC command

d602348 Add test for signrawtransaction (Andrew Chow)
eefff65 scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c05 Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of #10570. It also builds on top of #10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
maflcko pushed a commit that referenced this pull request Feb 21, 2018
eacc5b2 Declare CMutableTransaction a struct in rawtransaction.h (Ben Woosley)

Pull request description:

  Because it's a struct.

  Fix for #10579 - this was called out in code review. #10579 (comment)

Tree-SHA512: 10758a667218481de6f50b5ed874e92eb350c621f7a6355fba7da6ab42b09e1764f827e89491c8663e554fcfd23f124b299f968237c6ad1ff7819e211bd7e521
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 11, 2020
…on-wallet RPC command

d602348 Add test for signrawtransaction (Andrew Chow)
eefff65 scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c05 Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of bitcoin#10570. It also builds on top of bitcoin#10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 11, 2020
…action.h

eacc5b2 Declare CMutableTransaction a struct in rawtransaction.h (Ben Woosley)

Pull request description:

  Because it's a struct.

  Fix for bitcoin#10579 - this was called out in code review. bitcoin#10579 (comment)

Tree-SHA512: 10758a667218481de6f50b5ed874e92eb350c621f7a6355fba7da6ab42b09e1764f827e89491c8663e554fcfd23f124b299f968237c6ad1ff7819e211bd7e521
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 12, 2020
…on-wallet RPC command

d602348 Add test for signrawtransaction (Andrew Chow)
eefff65 scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c05 Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of bitcoin#10570. It also builds on top of bitcoin#10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 12, 2020
…action.h

eacc5b2 Declare CMutableTransaction a struct in rawtransaction.h (Ben Woosley)

Pull request description:

  Because it's a struct.

  Fix for bitcoin#10579 - this was called out in code review. bitcoin#10579 (comment)

Tree-SHA512: 10758a667218481de6f50b5ed874e92eb350c621f7a6355fba7da6ab42b09e1764f827e89491c8663e554fcfd23f124b299f968237c6ad1ff7819e211bd7e521
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 12, 2020
…on-wallet RPC command

d602348 Add test for signrawtransaction (Andrew Chow)
eefff65 scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c05 Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of bitcoin#10570. It also builds on top of bitcoin#10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Dec 12, 2020
Signed-off-by: pasta <pasta@dashboost.org>
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 12, 2020
…action.h

eacc5b2 Declare CMutableTransaction a struct in rawtransaction.h (Ben Woosley)

Pull request description:

  Because it's a struct.

  Fix for bitcoin#10579 - this was called out in code review. bitcoin#10579 (comment)

Tree-SHA512: 10758a667218481de6f50b5ed874e92eb350c621f7a6355fba7da6ab42b09e1764f827e89491c8663e554fcfd23f124b299f968237c6ad1ff7819e211bd7e521
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 15, 2020
…on-wallet RPC command

d602348 Add test for signrawtransaction (Andrew Chow)
eefff65 scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c05 Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of bitcoin#10570. It also builds on top of bitcoin#10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Dec 15, 2020
Signed-off-by: pasta <pasta@dashboost.org>
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 15, 2020
…action.h

eacc5b2 Declare CMutableTransaction a struct in rawtransaction.h (Ben Woosley)

Pull request description:

  Because it's a struct.

  Fix for bitcoin#10579 - this was called out in code review. bitcoin#10579 (comment)

Tree-SHA512: 10758a667218481de6f50b5ed874e92eb350c621f7a6355fba7da6ab42b09e1764f827e89491c8663e554fcfd23f124b299f968237c6ad1ff7819e211bd7e521
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 15, 2020
…on-wallet RPC command

d602348 Add test for signrawtransaction (Andrew Chow)
eefff65 scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c05 Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of bitcoin#10570. It also builds on top of bitcoin#10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Dec 15, 2020
Signed-off-by: pasta <pasta@dashboost.org>
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 15, 2020
…action.h

eacc5b2 Declare CMutableTransaction a struct in rawtransaction.h (Ben Woosley)

Pull request description:

  Because it's a struct.

  Fix for bitcoin#10579 - this was called out in code review. bitcoin#10579 (comment)

Tree-SHA512: 10758a667218481de6f50b5ed874e92eb350c621f7a6355fba7da6ab42b09e1764f827e89491c8663e554fcfd23f124b299f968237c6ad1ff7819e211bd7e521
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 18, 2020
…on-wallet RPC command

d602348 Add test for signrawtransaction (Andrew Chow)
eefff65 scripted-diff: change signrawtransaction to signrawtransactionwithwallet in tests (Andrew Chow)
1e79c05 Split signrawtransaction into wallet and non-wallet (Andrew Chow)

Pull request description:

  This PR is part of bitcoin#10570. It also builds on top of bitcoin#10571.

  This PR splits `signrawtransaction` into two commands, `signrawtransactionwithkey` and `signrawtransactionwithwallet`. `signrawtransactionwithkey` requires private keys to be passed in and does not use the wallet for any signing. `signrawtransactionwithwallet` uses the wallet to sign a raw transaction and does not have any parameters to take private keys.

  The `signrawtransaction` RPC has been marked as deprecated and will call the appropriate RPC command based upon the parameters given. A test was added to check this behavior is still consistent with the original behavior.

  All tests that used `signrawtransaction` have been updated to use one of the two new RPCs. Most uses were changed to `signrawtransactionwithwallet`. These were changed via a scripted diff.

Tree-SHA512: d0adf5b4cd7077639c504ec07bee262a3b94658d34db0a5c86a263b6393f7aa62f45129eafe29a7c861aa58440dd19348ee0c8b685e8a62d6f4adae8ec8f8cb3
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request Dec 18, 2020
Signed-off-by: pasta <pasta@dashboost.org>
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 18, 2020
…action.h

eacc5b2 Declare CMutableTransaction a struct in rawtransaction.h (Ben Woosley)

Pull request description:

  Because it's a struct.

  Fix for bitcoin#10579 - this was called out in code review. bitcoin#10579 (comment)

Tree-SHA512: 10758a667218481de6f50b5ed874e92eb350c621f7a6355fba7da6ab42b09e1764f827e89491c8663e554fcfd23f124b299f968237c6ad1ff7819e211bd7e521
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Mar 22, 2022
Signed-off-by: pasta <pasta@dashboost.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants