@@ -409,12 +409,22 @@ def sendrawtransaction_testmempoolaccept_tests(self):
409
409
testres = self .nodes [2 ].testmempoolaccept ([tx ['hex' ]], 0.00001000 )[0 ]
410
410
assert_equal (testres ['allowed' ], False )
411
411
assert_equal (testres ['reject-reason' ], 'max-fee-exceeded' )
412
+ testres = self .nodes [2 ].testmempoolaccept ([tx ['hex' ]], 0.00001000 , ['foobar' ])[0 ]
413
+ assert_equal (testres ['allowed' ], False )
414
+ assert_equal (testres ['reject-reason' ], 'max-fee-exceeded' )
415
+ # unless ignored explicitly
416
+ testres = self .nodes [2 ].testmempoolaccept ([tx ['hex' ]], 0.00001000 , ['max-fee-exceeded' ])[0 ]
417
+ assert_equal (testres ['allowed' ], True )
418
+ assert ('reject-reason' not in testres )
419
+ testres = self .nodes [2 ].testmempoolaccept ([tx ['hex' ]], 0.00001000 , ['absurdly-high-fee' ])[0 ]
420
+ assert_equal (testres ['allowed' ], True )
421
+ assert ('reject-reason' not in testres )
412
422
# and sendrawtransaction should throw
413
423
assert_raises_rpc_error (- 25 , fee_exceeds_max , self .nodes [2 ].sendrawtransaction , tx ['hex' ], 0.00001000 )
414
424
# and the following calls should both succeed
415
425
testres = self .nodes [2 ].testmempoolaccept (rawtxs = [tx ['hex' ]])[0 ]
416
426
assert_equal (testres ['allowed' ], True )
417
- self .nodes [2 ].sendrawtransaction (hexstring = tx ['hex' ])
427
+ self .nodes [2 ].sendrawtransaction (hexstring = tx ['hex' ], maxfeerate = 0.00001000 , ignore_rejects = [ 'max-fee-exceeded' ] )
418
428
419
429
# Test a transaction with a large fee.
420
430
# Fee rate is 0.20000000 BTC/kvB
0 commit comments