Skip to content

Commit

Permalink
test: remove dead code from p2p_initial_headers_sync.py to favor of…
Browse files Browse the repository at this point in the history
… disable mocktime

Credits to UdjinM6
  • Loading branch information
UdjinM6 authored and knst committed Sep 1, 2024
1 parent 4d9837c commit ef4d74a
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions test/functional/p2p_initial_headers_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,6 @@ def set_test_params(self):
self.disable_mocktime = True
self.num_nodes = 1

def setup_chain(self):
# This test operates under the assumption that the adjusted time is well ahead of block
# time.
#
# By default when we setup a new chain, we also adjust the mocktime (this is not done in
# Bitcoin's test suite), which violates this test's assumption and causes it to fail. We
# remedy this by ensuring the test's assumptions are met (i.e. we don't adjust mocktime)
#
self.log.info("Initializing test directory " + self.options.tmpdir)
if self.setup_clean_chain:
self._initialize_chain_clean()
else:
self._initialize_chain()

def announce_random_block(self, peers):
new_block_announcement = msg_inv(inv=[CInv(MSG_BLOCK, random.randrange(1<<256))])
for p in peers:
Expand Down

0 comments on commit ef4d74a

Please sign in to comment.