I’m utilizing https://github.com/freewil/bitcoin-testnet-box to run bitcoind in docker to check signing of transactions.

make begin tells me the bitcoind is began with out -regtest flag. See https://github.com/freewil/bitcoin-testnet-box/blob/master/Makefile#L13

After I run bitcoin-cli -datadir=1 getblockchaininfo, I certainly see "chain": "regtest" in output, so each the nodes are working in regression take a look at mode, I imagine.

If I generate an deal with for both of those 2 nodes, I get an deal with beginning with 2:

tester@4df64413049e ~/bitcoin-testnet-box$ make address1
bitcoin-cli -datadir=1  getnewaddress
2N4DTeBWDF9yaF9TJVGcgcZDM7EQtsGwFjX
tester@4df64413049e ~/bitcoin-testnet-box$ make address2
bitcoin-cli -datadir=2  getnewaddress
2MwxP8fyh9MFqKnZXZuqt3ZYByhLpNVoiX3

make getinfo tells me its not testnet both:

tester@4df64413049e ~/bitcoin-testnet-box$ make getinfo
bitcoin-cli -datadir=1  -getinfo
{
  "model": 170100,
  "protocolversion": 70015,
  "walletversion": 169900,
  "steadiness": 0.00000000,
  "blocks": 0,
  "timeoffset": 0,
  "connections": 1,
  "proxy": "",
  "problem": 4.656542373906925e-10,
  "testnet": false,
  "keypoololdest": 1599940906,
  "keypoolsize": 1000,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}
bitcoin-cli -datadir=2  -getinfo
{
  "model": 170100,
  "protocolversion": 70015,
  "walletversion": 169900,
  "steadiness": 0.00000000,
  "blocks": 0,
  "timeoffset": 0,
  "connections": 1,
  "proxy": "",
  "problem": 4.656542373906925e-10,
  "testnet": false,
  "keypoololdest": 1599940906,
  "keypoolsize": 1000,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}

So what mode I’m working these bitcoin nodes as? If I used to be to belief the output that its not testmode however one way or the other regression take a look at mode, should not the deal with begin with 1 if its actually regtest mode or with m/n if its testnet mode?

Additionally, after I dump the personal key for any of such deal with and attempt to derive the P2PKH deal with from it, it would not match. Identical code works effective with deal with and key taken from mainnet. What is going on on?

Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here