From faf5eb45c4a08fbfd9a8c12534bca8adfe756ef2 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 9 Sep 2020 10:48:45 +0200 Subject: [PATCH] test: Test empty array in gettxoutproof --- test/functional/rpc_txoutproof.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/functional/rpc_txoutproof.py b/test/functional/rpc_txoutproof.py index 66dbf292ac4..1699d36cfac 100755 --- a/test/functional/rpc_txoutproof.py +++ b/test/functional/rpc_txoutproof.py @@ -77,6 +77,8 @@ class MerkleBlockTest(BitcoinTestFramework): assert_equal(self.nodes[0].verifytxoutproof(self.nodes[1].gettxoutproof([txid_spent])), [txid_spent]) # We can't get a proof if we specify transactions from different blocks assert_raises_rpc_error(-5, "Not all transactions found in specified or retrieved block", self.nodes[0].gettxoutproof, [txid1, txid3]) + # Test empty list + assert_raises_rpc_error(-5, "Transaction not yet in block", self.nodes[0].gettxoutproof, []) # Now we'll try tweaking a proof. proof = self.nodes[1].gettxoutproof([txid1, txid2])