|
|
@ -22,7 +22,7 @@ import itertools |
|
|
|
|
|
|
|
|
|
|
|
from test_framework.test_framework import ComparisonTestFramework |
|
|
|
from test_framework.test_framework import ComparisonTestFramework |
|
|
|
from test_framework.util import * |
|
|
|
from test_framework.util import * |
|
|
|
from test_framework.mininode import CTransaction, NetworkThread |
|
|
|
from test_framework.mininode import CTransaction, network_thread_start |
|
|
|
from test_framework.blocktools import create_coinbase, create_block |
|
|
|
from test_framework.blocktools import create_coinbase, create_block |
|
|
|
from test_framework.comptool import TestInstance, TestManager |
|
|
|
from test_framework.comptool import TestInstance, TestManager |
|
|
|
from test_framework.script import CScript, OP_1NEGATE, OP_CHECKSEQUENCEVERIFY, OP_DROP |
|
|
|
from test_framework.script import CScript, OP_1NEGATE, OP_CHECKSEQUENCEVERIFY, OP_DROP |
|
|
@ -36,7 +36,7 @@ class BIP9SoftForksTest(ComparisonTestFramework): |
|
|
|
def run_test(self): |
|
|
|
def run_test(self): |
|
|
|
self.test = TestManager(self, self.options.tmpdir) |
|
|
|
self.test = TestManager(self, self.options.tmpdir) |
|
|
|
self.test.add_all_connections(self.nodes) |
|
|
|
self.test.add_all_connections(self.nodes) |
|
|
|
NetworkThread().start() # Start up network handling in another thread |
|
|
|
network_thread_start() |
|
|
|
self.test.run() |
|
|
|
self.test.run() |
|
|
|
|
|
|
|
|
|
|
|
def create_transaction(self, node, coinbase, to_address, amount): |
|
|
|
def create_transaction(self, node, coinbase, to_address, amount): |
|
|
@ -245,7 +245,7 @@ class BIP9SoftForksTest(ComparisonTestFramework): |
|
|
|
self.setup_chain() |
|
|
|
self.setup_chain() |
|
|
|
self.setup_network() |
|
|
|
self.setup_network() |
|
|
|
self.test.add_all_connections(self.nodes) |
|
|
|
self.test.add_all_connections(self.nodes) |
|
|
|
NetworkThread().start() |
|
|
|
network_thread_start() |
|
|
|
self.test.p2p_connections[0].wait_for_verack() |
|
|
|
self.test.p2p_connections[0].wait_for_verack() |
|
|
|
|
|
|
|
|
|
|
|
def get_tests(self): |
|
|
|
def get_tests(self): |
|
|
|