test: gettxoutproof duplicate txid

This commit is contained in:
João Barbosa 2020-08-31 16:14:50 +02:00 committed by MarcoFalke
parent faf5eb45c4
commit faf251d854
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -79,6 +79,8 @@ class MerkleBlockTest(BitcoinTestFramework):
assert_raises_rpc_error(-5, "Not all transactions found in specified or retrieved block", self.nodes[0].gettxoutproof, [txid1, txid3]) assert_raises_rpc_error(-5, "Not all transactions found in specified or retrieved block", self.nodes[0].gettxoutproof, [txid1, txid3])
# Test empty list # Test empty list
assert_raises_rpc_error(-5, "Transaction not yet in block", self.nodes[0].gettxoutproof, []) assert_raises_rpc_error(-5, "Transaction not yet in block", self.nodes[0].gettxoutproof, [])
# Test duplicate txid
assert_raises_rpc_error(-8, 'Invalid parameter, duplicated txid', self.nodes[0].gettxoutproof, [txid1, txid1])
# Now we'll try tweaking a proof. # Now we'll try tweaking a proof.
proof = self.nodes[1].gettxoutproof([txid1, txid2]) proof = self.nodes[1].gettxoutproof([txid1, txid2])