@@ -72,7 +72,13 @@ def run_test(self):
72
72
assert_raises_rpc_error (- 8 , "parameter 3 must be hexadecimal" , self .nodes [0 ].getrawtransaction , tx , True , True )
73
73
assert_raises_rpc_error (- 8 , "parameter 3 must be hexadecimal" , self .nodes [0 ].getrawtransaction , tx , True , "foobar" )
74
74
assert_raises_rpc_error (- 8 , "parameter 3 must be of length 64" , self .nodes [0 ].getrawtransaction , tx , True , "abcd1234" )
75
- assert_raises_rpc_error (- 5 , "Block hash not found" , self .nodes [0 ].getrawtransaction , tx , True , "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" )
75
+ assert_raises_rpc_error (- 5 , "Block hash not found" , self .nodes [0 ].getrawtransaction , tx , True , "0000000000000000000000000000000000000000000000000000000000000000" )
76
+ # Undo the blocks and check in_active_chain
77
+ self .nodes [0 ].invalidateblock (block1 )
78
+ gottx = self .nodes [0 ].getrawtransaction (txid = tx , verbose = True , blockhash = block1 )
79
+ assert_equal (gottx ['in_active_chain' ], False )
80
+ self .nodes [0 ].reconsiderblock (block1 )
81
+ assert_equal (self .nodes [0 ].getbestblockhash (), block2 )
76
82
77
83
#########################
78
84
# RAW TX MULTISIG TESTS #
@@ -212,13 +218,13 @@ def run_test(self):
212
218
assert_equal (self .nodes [0 ].getrawtransaction (txHash , True )["hex" ], rawTxSigned ['hex' ])
213
219
214
220
# 6. invalid parameters - supply txid and string "Flase"
215
- assert_raises_rpc_error (- 1 ,"not a boolean" , self .nodes [0 ].getrawtransaction , txHash , "Flase" )
221
+ assert_raises_rpc_error (- 1 , "not a boolean" , self .nodes [0 ].getrawtransaction , txHash , "Flase" )
216
222
217
223
# 7. invalid parameters - supply txid and empty array
218
- assert_raises_rpc_error (- 1 ,"not a boolean" , self .nodes [0 ].getrawtransaction , txHash , [])
224
+ assert_raises_rpc_error (- 1 , "not a boolean" , self .nodes [0 ].getrawtransaction , txHash , [])
219
225
220
226
# 8. invalid parameters - supply txid and empty dict
221
- assert_raises_rpc_error (- 1 ,"not a boolean" , self .nodes [0 ].getrawtransaction , txHash , {})
227
+ assert_raises_rpc_error (- 1 , "not a boolean" , self .nodes [0 ].getrawtransaction , txHash , {})
222
228
223
229
inputs = [ {'txid' : "1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000" , 'vout' : 1 , 'sequence' : 1000 }]
224
230
outputs = { self .nodes [0 ].getnewaddress () : 1 }
0 commit comments