Skip to content

Commit a5d00d4

Browse files
committedSep 9, 2021
Merge bitcoin#22788: scripted-diff: Use generate* from TestFramework
fa0b916 scripted-diff: Use generate* from TestFramework (MarcoFalke) Pull request description: This is needed for bitcoin#22567. By using the newly added `generate*` member functions of the test framework, it paves the way to make it easier to implicitly call `sync_all` after block generation to avoid intermittent issues. ACKs for top commit: jonatack: ACK fa0b916 Tree-SHA512: e74a324b60250a87c08847cdfd7b6ce3e1d89b891659fd168f6dd7dc0aa718d0edd28285374a613f462f34f4ef8e12c90ad44fb58721c91b2ea691406ad22c2a
2 parents eb1f570 + fa0b916 commit a5d00d4

File tree

117 files changed

+468
-468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+468
-468
lines changed
 

‎test/functional/example_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def run_test(self):
141141
peer_messaging = self.nodes[0].add_p2p_connection(BaseNode())
142142

143143
# Generating a block on one of the nodes will get us out of IBD
144-
blocks = [int(self.nodes[0].generate(nblocks=1)[0], 16)]
144+
blocks = [int(self.generate(self.nodes[0], nblocks=1)[0], 16)]
145145
self.sync_all(self.nodes[0:2])
146146

147147
# Notice above how we called an RPC by calling a method with the same

‎test/functional/feature_abortnode.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ def setup_network(self):
2626
# We'll connect the nodes later
2727

2828
def run_test(self):
29-
self.nodes[0].generate(3)
29+
self.generate(self.nodes[0], 3)
3030
datadir = get_datadir_path(self.options.tmpdir, 0)
3131

3232
# Deleting the undo file will result in reorg failure
3333
os.unlink(os.path.join(datadir, self.chain, 'blocks', 'rev00000.dat'))
3434

3535
# Connecting to a node with a more work chain will trigger a reorg
3636
# attempt.
37-
self.nodes[1].generate(3)
37+
self.generate(self.nodes[1], 3)
3838
with self.nodes[0].assert_debug_log(["Failed to disconnect block"]):
3939
self.connect_nodes(0, 1)
40-
self.nodes[1].generate(1)
40+
self.generate(self.nodes[1], 1)
4141

4242
# Check that node0 aborted
4343
self.log.info("Waiting for crash")

0 commit comments

Comments
 (0)
Please sign in to comment.