diff options
| author | Sjors Provoost <[email protected]> | 2019-10-26 12:03:38 +0200 |
|---|---|---|
| committer | Sjors Provoost <[email protected]> | 2019-10-26 12:03:38 +0200 |
| commit | 29a21c90610aed88b796a7a5900e42e9048b990e (patch) | |
| tree | 6b1abacd5c13f0f39a7144369a9d7a9361275938 | |
| parent | Merge #17135: gui: Make polling in ClientModel asynchronous (diff) | |
| download | discoin-29a21c90610aed88b796a7a5900e42e9048b990e.tar.xz discoin-29a21c90610aed88b796a7a5900e42e9048b990e.zip | |
[rpc] set default bip32derivs to true for psbt methods
| -rw-r--r-- | doc/release-notes-17264.md | 4 | ||||
| -rw-r--r-- | src/wallet/psbtwallet.h | 2 | ||||
| -rw-r--r-- | src/wallet/rpcwallet.cpp | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/doc/release-notes-17264.md b/doc/release-notes-17264.md new file mode 100644 index 000000000..f6e097959 --- /dev/null +++ b/doc/release-notes-17264.md @@ -0,0 +1,4 @@ +Updated RPCs +------------ + +- `walletprocesspsbt` and `walletcreatefundedpsbt` now include BIP 32 derivation paths by default for public keys if we know them. This can be disabled by setting `bip32derivs` to `false`. diff --git a/src/wallet/psbtwallet.h b/src/wallet/psbtwallet.h index a7e52df6d..ec79284e6 100644 --- a/src/wallet/psbtwallet.h +++ b/src/wallet/psbtwallet.h @@ -27,6 +27,6 @@ NODISCARD TransactionError FillPSBT(const CWallet* pwallet, bool& complete, int sighash_type = 1 /* SIGHASH_ALL */, bool sign = true, - bool bip32derivs = false); + bool bip32derivs = true); #endif // BITCOIN_WALLET_PSBTWALLET_H diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index e57150122..af5101228 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3984,7 +3984,7 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request) " \"ALL|ANYONECANPAY\"\n" " \"NONE|ANYONECANPAY\"\n" " \"SINGLE|ANYONECANPAY\""}, - {"bip32derivs", RPCArg::Type::BOOL, /* default */ "false", "If true, includes the BIP 32 derivation paths for public keys if we know them"}, + {"bip32derivs", RPCArg::Type::BOOL, /* default */ "true", "Include BIP 32 derivation paths for public keys if we know them"}, }, RPCResult{ "{\n" @@ -4012,7 +4012,7 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request) // Fill transaction with our data and also sign bool sign = request.params[1].isNull() ? true : request.params[1].get_bool(); - bool bip32derivs = request.params[3].isNull() ? false : request.params[3].get_bool(); + bool bip32derivs = request.params[3].isNull() ? true : request.params[3].get_bool(); bool complete = true; const TransactionError err = FillPSBT(pwallet, psbtx, complete, nHashType, sign, bip32derivs); if (err != TransactionError::OK) { @@ -4095,7 +4095,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request) " \"CONSERVATIVE\""}, }, "options"}, - {"bip32derivs", RPCArg::Type::BOOL, /* default */ "false", "If true, includes the BIP 32 derivation paths for public keys if we know them"}, + {"bip32derivs", RPCArg::Type::BOOL, /* default */ "true", "Include BIP 32 derivation paths for public keys if we know them"}, }, RPCResult{ "{\n" @@ -4134,7 +4134,7 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request) PartiallySignedTransaction psbtx(rawTx); // Fill transaction with out data but don't sign - bool bip32derivs = request.params[4].isNull() ? false : request.params[4].get_bool(); + bool bip32derivs = request.params[4].isNull() ? true : request.params[4].get_bool(); bool complete = true; const TransactionError err = FillPSBT(pwallet, psbtx, complete, 1, false, bip32derivs); if (err != TransactionError::OK) { |