Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_block.py
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | def run_test(self): | ||||
blocks = [] | blocks = [] | ||||
for i in range(NUM_BUFFER_BLOCKS_TO_GENERATE): | for i in range(NUM_BUFFER_BLOCKS_TO_GENERATE): | ||||
blocks.append(self.next_block("maturitybuffer.{}".format(i))) | blocks.append(self.next_block("maturitybuffer.{}".format(i))) | ||||
self.save_spendable_output() | self.save_spendable_output() | ||||
self.send_blocks(blocks) | self.send_blocks(blocks) | ||||
# collect spendable outputs now to avoid cluttering the code later on | # collect spendable outputs now to avoid cluttering the code later on | ||||
out = [] | out = [] | ||||
for i in range(NUM_OUTPUTS_TO_COLLECT): | for _ in range(NUM_OUTPUTS_TO_COLLECT): | ||||
out.append(self.get_spendable_output()) | out.append(self.get_spendable_output()) | ||||
# Start by building a couple of blocks on top (which output is spent is | # Start by building a couple of blocks on top (which output is spent is | ||||
# in parentheses): | # in parentheses): | ||||
# genesis -> b1 (0) -> b2 (1) | # genesis -> b1 (0) -> b2 (1) | ||||
b1 = self.next_block(1, spend=out[0]) | b1 = self.next_block(1, spend=out[0]) | ||||
self.save_spendable_output() | self.save_spendable_output() | ||||
▲ Show 20 Lines • Show All 1,173 Lines • Show Last 20 Lines |