@@ -218,8 +218,34 @@ def test_TransactionFailedToResolve(self):
218
218
fee = 1000000 - i * 1000 ,
219
219
api_url = self .node .getClient ().url )
220
220
response = self .node .getClient ().test_tx_pool_accept (tx , "passthrough" )
221
- expected_error_message = "TransactionFailedToResolve"
222
- assert expected_error_message in exc_info .value .args [0 ], \
223
- f"Expected substring '{ expected_error_message } ' not found in actual string '{ exc_info .value .args [0 ]} '"
224
- with pytest .raises (Exception ) as exc_info :
225
- self .node .getClient ().send_transaction (tx )
221
+ expected_error_message = "TransactionFailedToResolve"
222
+ assert expected_error_message in exc_info .value .args [0 ], \
223
+ f"Expected substring '{ expected_error_message } ' not found in actual string '{ exc_info .value .args [0 ]} '"
224
+ with pytest .raises (Exception ) as exc_info :
225
+ self .node .getClient ().send_transaction (tx )
226
+
227
+ def test_change_cache_tx (self ):
228
+ account = self .Ckb_cli .util_key_info_by_private_key (self .Config .ACCOUNT_PRIVATE_1 )
229
+ father_tx_hash = self .Ckb_cli .wallet_transfer_by_private_key (self .Config .ACCOUNT_PRIVATE_1 ,
230
+ account ["address" ]["testnet" ], 100000 ,
231
+ self .node .getClient ().url , "1500000" )
232
+
233
+ tx = self .Tx .build_send_transfer_self_tx_with_input ([father_tx_hash ], ['0x0' ], self .Config .ACCOUNT_PRIVATE_1 ,
234
+ output_count = 15 ,
235
+ fee = 15000 ,
236
+ api_url = self .node .getClient ().url )
237
+ tx_hash = self .node .getClient ().send_transaction (tx )
238
+ self .node .getClient ().remove_transaction (tx_hash )
239
+ tx ['witnesses' ][0 ] = "0x00"
240
+ with pytest .raises (Exception ) as exc_info :
241
+ tx_hash = self .node .getClient ().send_transaction (tx )
242
+ expected_error_message = "ValidationFailure"
243
+ assert expected_error_message in exc_info .value .args [0 ], \
244
+ f"Expected substring '{ expected_error_message } ' not found in actual string '{ exc_info .value .args [0 ]} '"
245
+ with pytest .raises (Exception ) as exc_info :
246
+ tx_hash = self .node .getClient ().test_tx_pool_accept (tx ,"passthrough" )
247
+ expected_error_message = "ValidationFailure"
248
+ assert expected_error_message in exc_info .value .args [0 ], \
249
+ f"Expected substring '{ expected_error_message } ' not found in actual string '{ exc_info .value .args [0 ]} '"
250
+
251
+
0 commit comments