Skip to content

Commit 50dfb63

Browse files
committed
test: sapling_key_import_export.py whitelist peers to speed up tx relay.
1 parent 060a0a5 commit 50dfb63

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/functional/sapling_key_import_export.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
from test_framework.test_framework import PivxTestFramework
1111
from 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

Comments
 (0)