Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_rawtransaction.py
Show All 24 Lines | |||||
) | ) | ||||
from test_framework.script import CScript | from test_framework.script import CScript | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.txtools import pad_raw_tx | from test_framework.txtools import pad_raw_tx | ||||
from test_framework.util import ( | from test_framework.util import ( | ||||
assert_equal, | assert_equal, | ||||
assert_greater_than, | assert_greater_than, | ||||
assert_raises_rpc_error, | assert_raises_rpc_error, | ||||
connect_nodes_bi, | connect_nodes, | ||||
hex_str_to_bytes, | hex_str_to_bytes, | ||||
) | ) | ||||
class multidict(dict): | class multidict(dict): | ||||
"""Dictionary that allows duplicate keys. | """Dictionary that allows duplicate keys. | ||||
Constructed with a list of (key, value) tuples. When dumped by the json module, | Constructed with a list of (key, value) tuples. When dumped by the json module, | ||||
will output invalid json with repeated keys, eg: | will output invalid json with repeated keys, eg: | ||||
Show All 16 Lines | def set_test_params(self): | ||||
self.num_nodes = 3 | self.num_nodes = 3 | ||||
self.extra_args = [["-txindex"], ["-txindex"], ["-txindex"]] | self.extra_args = [["-txindex"], ["-txindex"], ["-txindex"]] | ||||
def skip_test_if_missing_module(self): | def skip_test_if_missing_module(self): | ||||
self.skip_if_no_wallet() | self.skip_if_no_wallet() | ||||
def setup_network(self): | def setup_network(self): | ||||
super().setup_network() | super().setup_network() | ||||
connect_nodes_bi(self.nodes[0], self.nodes[2]) | connect_nodes(self.nodes[0], self.nodes[2]) | ||||
def run_test(self): | def run_test(self): | ||||
self.log.info( | self.log.info( | ||||
'prepare some coins for multiple *rawtransaction commands') | 'prepare some coins for multiple *rawtransaction commands') | ||||
self.nodes[2].generate(1) | self.nodes[2].generate(1) | ||||
self.sync_all() | self.sync_all() | ||||
self.nodes[0].generate(101) | self.nodes[0].generate(101) | ||||
self.sync_all() | self.sync_all() | ||||
▲ Show 20 Lines • Show All 520 Lines • Show Last 20 Lines |