aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_psbt.py
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2019-07-11 18:50:45 +0100
committerSjors Provoost <sjors@sprovoost.nl>2020-09-07 20:33:16 +0200
commit1bc8d0fd5906bc9637d513cd193a1f47ad94da28 (patch)
treebe9216ebdda7218dc910d5279b291434bf308cad /test/functional/rpc_psbt.py
parent25839661305ec9fe8c25d171e31270d95311a4e4 (diff)
downloadbitcoin-1bc8d0fd5906bc9637d513cd193a1f47ad94da28.tar.xz
[rpc] walletcreatefundedpsbt: allow inputs to be null
This is of neglible use here, but it allows new RPC methods to take outputs as their first argument and make inputs optional.
Diffstat (limited to 'test/functional/rpc_psbt.py')
-rwxr-xr-xtest/functional/rpc_psbt.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/functional/rpc_psbt.py b/test/functional/rpc_psbt.py
index 1c7dc98d16..781a49dfac 100755
--- a/test/functional/rpc_psbt.py
+++ b/test/functional/rpc_psbt.py
@@ -94,6 +94,9 @@ class PSBTTest(BitcoinTestFramework):
psbtx1 = self.nodes[0].walletcreatefundedpsbt([{"txid": utxo1['txid'], "vout": utxo1['vout']}], {self.nodes[2].getnewaddress():90}, 0, {"add_inputs": True})['psbt']
assert_equal(len(self.nodes[0].decodepsbt(psbtx1)['tx']['vin']), 2)
+ # Inputs argument can be null
+ self.nodes[0].walletcreatefundedpsbt(None, {self.nodes[2].getnewaddress():10})
+
# Node 1 should not be able to add anything to it but still return the psbtx same as before
psbtx = self.nodes[1].walletprocesspsbt(psbtx1)['psbt']
assert_equal(psbtx1, psbtx)