Skip to content

Commit

Permalink
Cleanup phonon activation in functional tests
Browse files Browse the repository at this point in the history
Summary:
Some phonon activation logic is left in abc-miner-fund to ensure
we do not break this logic.  Trying to clean up that logic further would
end up scrapping large parts of that test.

Test Plan:
```
test_runner.py abc-miner-fund
test_runner.py mempool_packages
```

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D6796
  • Loading branch information
jasonbcox authored and ftrader committed Aug 15, 2020
1 parent 384c7ee commit cc6075d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
7 changes: 5 additions & 2 deletions test/functional/bchn-no-miner-fund-activation.py
Expand Up @@ -34,8 +34,6 @@
class MinerFundTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.extra_args = [
["-phononactivationtime={}".format(PHONON_ACTIVATION_TIME)]]

def check_bip9_state(self, name, status):
assert_equal(False, 'softforks' in self.nodes[0].getblockchaininfo())
Expand Down Expand Up @@ -113,8 +111,13 @@ def run_miner_fund_test(self, bit, name, fund_address):
version = VERSION_BASE | (1 << bit)

self.stop_node(0)
<<<<<<< HEAD:test/functional/bchn-no-miner-fund-activation.py
self.start_node(0,
["-blockversion={}".format(version), "-phononactivationtime={}".format(PHONON_ACTIVATION_TIME)])
=======
self.start_node(
0, ['-enableminerfund', "-blockversion={}".format(version)])
>>>>>>> 9bbe4cd78... Cleanup phonon activation in functional tests:test/functional/abc-miner-fund.py

node = self.nodes[0]
node.setmocktime(1580000000)
Expand Down
13 changes: 1 addition & 12 deletions test/functional/mempool_packages.py
Expand Up @@ -16,23 +16,14 @@
sync_mempools,
)

# TODO: The activation code can be reverted after the new policy becomes
# active.

# Phonon dummy activation time
ACTIVATION_TIME = 2000000000

MAX_ANCESTORS = 50
MAX_DESCENDANTS = 50


class MempoolPackagesTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 2

common_params = ["-maxorphantx=1000",
"-phononactivationtime={}".format(ACTIVATION_TIME)]

common_params = ["-maxorphantx=1000"]
self.extra_args = [common_params,
common_params + ["-limitancestorcount=5"]]

Expand All @@ -57,8 +48,6 @@ def chain_transaction(self, node, parent_txid, vout,
return (txid, send_value)

def run_test(self):
[n.setmocktime(ACTIVATION_TIME) for n in self.nodes]

# Mine some blocks and have them mature.
self.nodes[0].generate(101)
utxo = self.nodes[0].listunspent(10)
Expand Down

0 comments on commit cc6075d

Please sign in to comment.