Skip to content

Commit e633527

Browse files
committed
fix 2 more tests
1 parent 9082149 commit e633527

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

test/functional/mining_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def run_test(self):
108108

109109
self.log.info("getblocktemplate: Test bad tx count")
110110
# The tx count is immediately after the block header
111-
TX_COUNT_OFFSET = len(CBlockHeader().serialize())
111+
TX_COUNT_OFFSET = len(super(CBlock, block).serialize())
112112
bad_block_sn = bytearray(block.serialize())
113113
assert_equal(bad_block_sn[TX_COUNT_OFFSET], 1)
114114
bad_block_sn[TX_COUNT_OFFSET] += 1

test/functional/rpc_rawtransaction.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -358,18 +358,13 @@ def run_test(self):
358358

359359
# decoderawtransaction tests
360360
# witness transaction
361-
encrawtx = "010000000001010000000000000072c1a6a246ae63f74f931e8365e15a089c68d61900000000000000000000ffffffff0100e1f50500000000000000000000"
361+
encrawtx = "0100000000010000000000000072c1a6a246ae63f74f931e8365e15a089c68d61900000000000000000000ffffffff0100e1f505000000000000000000"
362362
decrawtx = self.nodes[0].decoderawtransaction(encrawtx, True) # decode as witness transaction
363363
assert_equal(decrawtx['vout'][0]['value'], Decimal('1.00000000'))
364-
assert_raises_rpc_error(-22, 'TX decode failed', self.nodes[0].decoderawtransaction, encrawtx, False) # force decode as non-witness transaction
365-
# non-witness transaction
366-
encrawtx = "01000000010000000000000072c1a6a246ae63f74f931e8365e15a089c68d61900000000000000000000ffffffff0100e1f505000000000000000000"
367-
decrawtx = self.nodes[0].decoderawtransaction(encrawtx, False) # decode as non-witness transaction
368-
assert_equal(decrawtx['vout'][0]['value'], Decimal('1.00000000'))
369364

370365
# getrawtransaction tests
371366
# 1. valid parameters - only supply txid
372-
txHash = rawTx["hash"]
367+
txHash = rawTx["txid"]
373368
assert_equal(self.nodes[0].getrawtransaction(txHash), rawTxSigned['hex'])
374369

375370
# 2. valid parameters - supply txid and 0 for non-verbose

0 commit comments

Comments
 (0)