Skip to content

Commit a65dafa

Browse files
committed
replace tx hash with txid in test rawtransaction
1 parent 12fd4bb commit a65dafa

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/functional/rpc_rawtransaction.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -361,30 +361,30 @@ def run_test(self):
361361

362362
# getrawtransaction tests
363363
# 1. valid parameters - only supply txid
364-
txHash = rawTx["hash"]
365-
assert_equal(self.nodes[0].getrawtransaction(txHash), rawTxSigned['hex'])
364+
txId = rawTx["txid"]
365+
assert_equal(self.nodes[0].getrawtransaction(txId), rawTxSigned['hex'])
366366

367367
# 2. valid parameters - supply txid and 0 for non-verbose
368-
assert_equal(self.nodes[0].getrawtransaction(txHash, 0), rawTxSigned['hex'])
368+
assert_equal(self.nodes[0].getrawtransaction(txId, 0), rawTxSigned['hex'])
369369

370370
# 3. valid parameters - supply txid and False for non-verbose
371-
assert_equal(self.nodes[0].getrawtransaction(txHash, False), rawTxSigned['hex'])
371+
assert_equal(self.nodes[0].getrawtransaction(txId, False), rawTxSigned['hex'])
372372

373373
# 4. valid parameters - supply txid and 1 for verbose.
374374
# We only check the "hex" field of the output so we don't need to update this test every time the output format changes.
375-
assert_equal(self.nodes[0].getrawtransaction(txHash, 1)["hex"], rawTxSigned['hex'])
375+
assert_equal(self.nodes[0].getrawtransaction(txId, 1)["hex"], rawTxSigned['hex'])
376376

377377
# 5. valid parameters - supply txid and True for non-verbose
378-
assert_equal(self.nodes[0].getrawtransaction(txHash, True)["hex"], rawTxSigned['hex'])
378+
assert_equal(self.nodes[0].getrawtransaction(txId, True)["hex"], rawTxSigned['hex'])
379379

380380
# 6. invalid parameters - supply txid and string "Flase"
381-
assert_raises_rpc_error(-1, "not a boolean", self.nodes[0].getrawtransaction, txHash, "Flase")
381+
assert_raises_rpc_error(-1, "not a boolean", self.nodes[0].getrawtransaction, txId, "Flase")
382382

383383
# 7. invalid parameters - supply txid and empty array
384-
assert_raises_rpc_error(-1, "not a boolean", self.nodes[0].getrawtransaction, txHash, [])
384+
assert_raises_rpc_error(-1, "not a boolean", self.nodes[0].getrawtransaction, txId, [])
385385

386386
# 8. invalid parameters - supply txid and empty dict
387-
assert_raises_rpc_error(-1, "not a boolean", self.nodes[0].getrawtransaction, txHash, {})
387+
assert_raises_rpc_error(-1, "not a boolean", self.nodes[0].getrawtransaction, txId, {})
388388

389389
inputs = [ {'txid' : "1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000", 'vout' : 1, 'sequence' : 1000}]
390390
outputs = { self.nodes[0].getnewaddress() : 1 }

0 commit comments

Comments
 (0)