def setUp(self): """ Method called to prepare the test fixture. 1. Start Bitcoin Core Daemon and get a default Bitcoin address. 2. Attempt to try a connection to a node once in our host list. 3. Get fixed(default) and some normal addresses in core wallet. """ result = {} role = BaseRole(env.host) if RESET_BLOCKCHAIN: role.reset_and_restart() else: role.start() result['default'] = role.getfixedaddress() # Try a connection with each other for host in env.hosts: if host == env.host: continue role.addnode(host, config.port) result['wallet'] = role.listwalletaddress(config.NUM_ADDRESS_PER_NODE) return result
def setUp(self): """ Method called to prepare the test fixture. 1. Start Bitcoin Core Daemon and get a default Bitcoin address. 2. Attempt to try a connection to a node once in our host list. 3. Get fixed(default) and some normal addresses in core wallet. """ result = {} role = BaseRole(env.host) if RESET_BLOCKCHAIN: role.reset_and_restart() else: role.start() result['default'] = role.getfixedaddress() # Try a connection with each other for host in env.hosts: if host == env.host: continue role.addnode(host.split('_')[0], host.split('_')[1]) result['wallet'] = role.listwalletaddress(config.NUM_ADDRESS_PER_NODE) return result