From fa0aa87071eaec8a5df17774cdb352195e5e09de Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Thu, 7 Jan 2021 16:47:35 +0100 Subject: rpc: Return wtxid from testmempoolaccept --- test/functional/p2p_segwit.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'test/functional/p2p_segwit.py') diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index a9d8b12d70..54891b07e1 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -686,13 +686,35 @@ class SegWitTest(BitcoinTestFramework): if not self.segwit_active: # Just check mempool acceptance, but don't add the transaction to the mempool, since witness is disallowed # in blocks and the tx is impossible to mine right now. - assert_equal(self.nodes[0].testmempoolaccept([tx3.serialize_with_witness().hex()]), [{'txid': tx3.hash, 'allowed': True, 'vsize': tx3.get_vsize(), 'fees': { 'base': Decimal('0.00001000')}}]) + assert_equal( + self.nodes[0].testmempoolaccept([tx3.serialize_with_witness().hex()]), + [{ + 'txid': tx3.hash, + 'wtxid': tx3.getwtxid(), + 'allowed': True, + 'vsize': tx3.get_vsize(), + 'fees': { + 'base': Decimal('0.00001000'), + }, + }], + ) # Create the same output as tx3, but by replacing tx tx3_out = tx3.vout[0] tx3 = tx tx3.vout = [tx3_out] tx3.rehash() - assert_equal(self.nodes[0].testmempoolaccept([tx3.serialize_with_witness().hex()]), [{'txid': tx3.hash, 'allowed': True, 'vsize': tx3.get_vsize(), 'fees': { 'base': Decimal('0.00011000')}}]) + assert_equal( + self.nodes[0].testmempoolaccept([tx3.serialize_with_witness().hex()]), + [{ + 'txid': tx3.hash, + 'wtxid': tx3.getwtxid(), + 'allowed': True, + 'vsize': tx3.get_vsize(), + 'fees': { + 'base': Decimal('0.00011000'), + }, + }], + ) test_transaction_acceptance(self.nodes[0], self.test_node, tx3, with_witness=True, accepted=True) self.nodes[0].generate(1) -- cgit v1.2.3