1010from test_framework .test_framework import PivxTestFramework
1111from test_framework .util import assert_equal , assert_greater_than
1212
13- class SaplingkeyImportExportTest (PivxTestFramework ):
13+ class SaplingkeyImportExportTest (PivxTestFramework ):
1414
1515 def set_test_params (self ):
1616 self .num_nodes = 5
1717 self .setup_clean_chain = True
18- saplingUpgrade = [ '-nuparams=v5_shield:1' ]
19- self .extra_args = [saplingUpgrade , saplingUpgrade , saplingUpgrade , saplingUpgrade , saplingUpgrade ]
18+ # whitelist all peers to speed up tx relay / mempool sync
19+ self .extra_args = [[ '-nuparams=v5_shield:1' , "-whitelist=127.0.0.1" ]] * self . num_nodes
2020
2121 def run_test (self ):
2222 [alice , bob , charlie , david , miner ] = self .nodes
@@ -25,7 +25,7 @@ def run_test(self):
2525 def shielded_send (from_node , from_addr , to_addr , amount ):
2626 txid = from_node .shieldsendmany (from_addr ,
2727 [{"address" : to_addr , "amount" : Decimal (amount )}], 1 )
28- self .sync_all ()
28+ self .sync_mempools ()
2929 miner .generate (1 )
3030 self .sync_all ()
3131 return txid
@@ -51,9 +51,9 @@ def get_private_balance(node):
5151
5252 # Seed Alice with some funds
5353 alice .generate (10 )
54- self .sync_all ()
54+ self .sync_blocks ()
5555 miner .generate (100 )
56- self .sync_all ()
56+ self .sync_blocks ()
5757 fromAddress = alice .listunspent ()[0 ]['address' ]
5858 amountTo = 10 * 250 - 1
5959 # Shield Alice's coinbase funds to her shield_addr
0 commit comments