mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-26 22:08:58 +01:00
rpc: Reject empty txids in gettxoutproof
This commit is contained in:
@@ -78,7 +78,7 @@ class MerkleBlockTest(BitcoinTestFramework):
|
||||
# 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, [])
|
||||
assert_raises_rpc_error(-8, "Parameter 'txids' cannot be empty", self.nodes[0].gettxoutproof, [])
|
||||
# Test duplicate txid
|
||||
assert_raises_rpc_error(-8, 'Invalid parameter, duplicated txid', self.nodes[0].gettxoutproof, [txid1, txid1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user