mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge #15911: Use wallet RBF default for walletcreatefundedpsbt
d6b3640ac7[test] walletcreatefundedpsbt: check RBF is disabled when -walletrbf=0 (Sjors Provoost)9ed062b568[doc] rpc: remove "fallback to" from RBF default help (Sjors Provoost)4fcb698bc2[rpc] walletcreatefundedpsbt: use wallet default RBF (Sjors Provoost) Pull request description: The `walletcreatefundedpsbt` RPC call currently ignores `-walletrbf` and defaults to not use RBF. This PR fixes that. This PR also replaces UniValue in `ConstructTransaction` with a `bool` in preparation of moving this helper method out of the RPC codebase entirely. This may be a bit overkill, but does slightly simplify it. Fixes #15878 ACKs for top commit: achow101: Code Review ACKd6b3640ac7l2a5b1: re-ACKd6b3640MarcoFalke: ACKd6b3640ac7Tree-SHA512: 55b9bccd1ef36b54f6b34793017dc0721103099ad3761b3b04862291ee13d6915915d4dbb1a8567924fa56e5e95dfe10eec070e06701610e70c87f8ea92b2a00
This commit is contained in:
@@ -406,7 +406,11 @@ static UniValue createrawtransaction(const JSONRPCRequest& request)
|
||||
}, true
|
||||
);
|
||||
|
||||
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], request.params[3]);
|
||||
bool rbf = false;
|
||||
if (!request.params[3].isNull()) {
|
||||
rbf = request.params[3].isTrue();
|
||||
}
|
||||
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], rbf);
|
||||
|
||||
return EncodeHexTx(CTransaction(rawTx));
|
||||
}
|
||||
@@ -1365,7 +1369,11 @@ UniValue createpsbt(const JSONRPCRequest& request)
|
||||
}, true
|
||||
);
|
||||
|
||||
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], request.params[3]);
|
||||
bool rbf = false;
|
||||
if (!request.params[3].isNull()) {
|
||||
rbf = request.params[3].isTrue();
|
||||
}
|
||||
CMutableTransaction rawTx = ConstructTransaction(request.params[0], request.params[1], request.params[2], rbf);
|
||||
|
||||
// Make a blank psbt
|
||||
PartiallySignedTransaction psbtx;
|
||||
|
||||
Reference in New Issue
Block a user