From 3cb8d05d90785b57d1ae7b4c87a26e6a82a41133 Mon Sep 17 00:00:00 2001 From: lgehr Date: Wed, 4 Aug 2021 18:23:52 +0200 Subject: [PATCH 1/2] Initialized value as a float This makes static type checkers complain less --- testchain/address.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testchain/address.py b/testchain/address.py index aa771cc..03458c3 100644 --- a/testchain/address.py +++ b/testchain/address.py @@ -37,7 +37,7 @@ def __init__(self, key: CBitcoinSecret, address_type: str = "p2pkh"): self.address = P2WSHBitcoinAddress.from_scriptPubKey(script_pub_key) else: raise UnsupportedAddressTypeError() - self.value = 0 + self.value = 0.0 self.txid = None self.vout = None From 345fcc1440b045a50c1686de0a43529742eeda4f Mon Sep 17 00:00:00 2001 From: lgehr Date: Wed, 4 Aug 2021 18:24:38 +0200 Subject: [PATCH 2/2] Creates a wallet on start Fixes #5 --- testchain/runner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/testchain/runner.py b/testchain/runner.py index 2c22a41..9fa6a5a 100644 --- a/testchain/runner.py +++ b/testchain/runner.py @@ -34,6 +34,7 @@ def __init__(self, output_dir, chain, executable): self._setup_chain_params() self._setup_bitcoind() self.proxy = bitcointx.rpc.Proxy(btc_conf_file=self.conf_file) + self.proxy.call("createwallet", os.path.join(self.tempdir.name, "testwallet")) self.proxy.call("importprivkey", COINBASE_KEY) def _setup_logger(self):