Skip to content

Commit

Permalink
Merge #2701: [test] sapling_key_import_export.py whitelist peers to s…
Browse files Browse the repository at this point in the history
…peed up tx relay.

50dfb63 test: sapling_key_import_export.py whitelist peers to speed up tx relay. (furszy)

Pull request description:

  Same rationale as #2633, whitelist peers so the trickle mechanism does not delay the mempool txs relay.
  Saw this test failing here https://github.com/PIVX-Project/PIVX/runs/4643010485?check_suite_focus=true .

ACKs for top commit:
  random-zebra:
    utACK 50dfb63
  Fuzzbawls:
    ACK 50dfb63

Tree-SHA512: b08c6975729bbc7bdc3c40055904aeed715d4ee178e649aef94778e99d628af7b56c1b8e99a3aa916cbddcf5b8665bf1586d675b0c795173a3729dd6a701ffe8
  • Loading branch information
furszy committed Dec 30, 2021
2 parents 83a8183 + 50dfb63 commit 6ed103f
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 6ed103f

Please sign in to comment.