Skip to content

Commit

Permalink
test: sapling_key_import_export.py whitelist peers to speed up tx relay.
Browse files Browse the repository at this point in the history
  • Loading branch information
furszy committed Dec 27, 2021
1 parent 060a0a5 commit 50dfb63
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/functional/sapling_key_import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
from test_framework.test_framework import PivxTestFramework
from test_framework.util import assert_equal, assert_greater_than

class SaplingkeyImportExportTest (PivxTestFramework):
class SaplingkeyImportExportTest(PivxTestFramework):

def set_test_params(self):
self.num_nodes = 5
self.setup_clean_chain = True
saplingUpgrade = ['-nuparams=v5_shield:1']
self.extra_args = [saplingUpgrade, saplingUpgrade, saplingUpgrade, saplingUpgrade, saplingUpgrade]
# whitelist all peers to speed up tx relay / mempool sync
self.extra_args = [['-nuparams=v5_shield:1', "-whitelist=127.0.0.1"]] * self.num_nodes

def run_test(self):
[alice, bob, charlie, david, miner] = self.nodes
Expand All @@ -25,7 +25,7 @@ def run_test(self):
def shielded_send(from_node, from_addr, to_addr, amount):
txid = from_node.shieldsendmany(from_addr,
[{"address": to_addr, "amount": Decimal(amount)}], 1)
self.sync_all()
self.sync_mempools()
miner.generate(1)
self.sync_all()
return txid
Expand All @@ -51,9 +51,9 @@ def get_private_balance(node):

# Seed Alice with some funds
alice.generate(10)
self.sync_all()
self.sync_blocks()
miner.generate(100)
self.sync_all()
self.sync_blocks()
fromAddress = alice.listunspent()[0]['address']
amountTo = 10 * 250 - 1
# Shield Alice's coinbase funds to her shield_addr
Expand Down

0 comments on commit 50dfb63

Please sign in to comment.