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/grasp/Makefile#L13
Once I run bitcoin-cli -datadir=1 getblockchaininfo
, I certainly see "chain": "regtest"
in output, so each the nodes are operating in regression check mode, I imagine.
If I generate an handle for both of those 2 nodes, I get an handle 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": "",
"issue": 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": "",
"issue": 4.656542373906925e-10,
"testnet": false,
"keypoololdest": 1599940906,
"keypoolsize": 1000,
"paytxfee": 0.00000000,
"relayfee": 0.00001000,
"warnings": ""
}
So what mode I’m operating these bitcoin nodes as? If I used to be to belief the output that its not testmode however by some means regression check mode, should not the handle 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 handle and attempt to derive the P2PKH handle from it, it would not match. Similar code works positive with handle and key taken from mainnet. What is going on on?