Make "address prefix" (and maybe also other parts) regtest compatible
In bitcore-node-crown testing code, it's using the command "crownd --regtest". However, the test couldn't pass now.
This is because currently in some parts of the core's address prefix code, regtest is mistakenly treated as livenet. For example, in base58.cpp, bCBase58Data::GetVersionBytes()
, there is:
if(Params().NetworkID() == CBaseChainParams::TESTNET)
{
// Testnet has 't' in front of the prefix
nVersionBytes = m_VersionBytesTest;
}
This makes only CBaseChainParams::TESTNET
treated as testnet, and makes both CBaseChainParams::LIVENET
and CBaseChainParams::REGTEST
treated as livenet.
I think there may be also other parts, which is not related to the address prefix feature, also having this issue. We may need to search for every CBaseChainParams::TESTNET
to decide whether it needs to fix.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information