@@ -32,6 +32,7 @@ def set_test_params(self):
32
32
# This test isn't testing tx relay. Set whitelist on the peers for
33
33
# instant tx relay.
34
34
self .
extra_args = [[
'[email protected] ' ]]
* self .
num_nodes
35
+ self .rpc_timeout = 90 # to prevent timeouts in `test_transaction_too_large`
35
36
36
37
def skip_test_if_missing_module (self ):
37
38
self .skip_if_no_wallet ()
@@ -910,22 +911,23 @@ def test_subtract_fee_with_presets(self):
910
911
911
912
def test_transaction_too_large (self ):
912
913
self .log .info ("Test fundrawtx where BnB solution would result in a too large transaction, but Knapsack would not" )
913
-
914
914
self .nodes [0 ].createwallet ("large" )
915
915
wallet = self .nodes [0 ].get_wallet_rpc (self .default_wallet_name )
916
916
recipient = self .nodes [0 ].get_wallet_rpc ("large" )
917
917
outputs = {}
918
918
rawtx = recipient .createrawtransaction ([], {wallet .getnewaddress (): 147.99899260 })
919
919
920
- # Make 1500 0.1 BTC outputs
921
- # The amount that we target for funding is in the BnB range when these outputs are used.
922
- # However if these outputs are selected, the transaction will end up being too large, so it shouldn't use BnB and instead fallback to Knapsack
923
- # but that behavior is not implemented yet. For now we just check that we get an error.
924
- for i in range (0 , 1500 ):
920
+ # Make 1500 0.1 BTC outputs. The amount that we target for funding is in
921
+ # the BnB range when these outputs are used. However if these outputs
922
+ # are selected, the transaction will end up being too large, so it
923
+ # shouldn't use BnB and instead fall back to Knapsack but that behavior
924
+ # is not implemented yet. For now we just check that we get an error.
925
+ for _ in range (1500 ):
925
926
outputs [recipient .getnewaddress ()] = 0.1
926
927
wallet .sendmany ("" , outputs )
927
928
self .nodes [0 ].generate (10 )
928
929
assert_raises_rpc_error (- 4 , "Transaction too large" , recipient .fundrawtransaction , rawtx )
929
930
931
+
930
932
if __name__ == '__main__' :
931
933
RawTransactionsTest ().main ()
0 commit comments