def setUp(self): logging.basicConfig() logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG) # FIXME get connection from config file. self.path_dic = {} self.addr_dic = {} self.desc_dic = {} self.master_blinding_key = '' self.ct_addr_dic = {} self.blind_key_dic = {} self.tx_dic = {} self.sidechaininfo = {} self.pegged_asset = '' self.fedpegscript = '' self.parent_blockhash = '' self.pegin_confirmation_depth = 0 self.hdwallet = HDWallet.from_mnemonic(MNEMONIC, passphrase=PASSPHRASE, network=MAINCHAIN_NETWORK) create_bitcoin_address(self) self.btcConn = RpcWrapper(port=18443, rpc_user='******', rpc_password='******') self.elmConn = RpcWrapper(port=18447, rpc_user='******', rpc_password='******') # init command btc_rpc = self.btcConn.get_rpc() btc_rpc.settxfee(0.00001)
def setUp(self): logging.basicConfig() logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG) self.path_dic = {} self.addr_dic = {} self.desc_dic = {} self.hdwallet = HDWallet.from_mnemonic(MNEMONIC, passphrase=PASSPHRASE, network=NETWORK) create_bitcoin_address(self) self.conn = RpcWrapper(port=18443, rpc_user='******', rpc_password='******')
class TestElements(unittest.TestCase): def setUp(self): logging.basicConfig() logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG) # FIXME get connection from config file. self.path_dic = {} self.addr_dic = {} self.desc_dic = {} self.master_blinding_key = '' self.ct_addr_dic = {} self.blind_key_dic = {} self.tx_dic = {} self.sidechaininfo = {} self.pegged_asset = '' self.fedpegscript = '' self.parent_blockhash = '' self.pegin_confirmation_depth = 0 self.hdwallet = HDWallet.from_mnemonic(MNEMONIC, passphrase=PASSPHRASE, network=MAINCHAIN_NETWORK) create_bitcoin_address(self) self.btcConn = RpcWrapper(port=18443, rpc_user='******', rpc_password='******') self.elmConn = RpcWrapper(port=18447, rpc_user='******', rpc_password='******') # init command btc_rpc = self.btcConn.get_rpc() btc_rpc.settxfee(0.00001) def test_elements(self): ''' To execute sequentially, define only one test and call the test function in it. ''' get_elements_config(self) test_import_address(self) test_generate_btc(self) test_pegin(self) test_elements_pkh(self) test_elements_multisig(self) # issue on RPC # reissue # send multi asset # destroy amount test_elements_dynafed(self)