VeriBlock / vbk-ri-btc

Bitcoin Core integration/staging tree
https://bitcoincore.org/en/download
Other
4 stars 6 forks source link

Check if connected nodecore is same network as configured #180

Closed Leonardiae closed 4 years ago

Leonardiae commented 4 years ago

It's possible to configure a testnet nodecore and connect it to a mainnet nodecore. A testnetwallet is created but the mistake is not detected by the APM. After correcting the node in application.conf and starting the apm it can't sync because of this error:

2020-06-12 10:26:05 nc-poll WARN NodeCoreNetwork - NodeCore Error: Unable to retrieve changes since VBK block 00000000000016EBFB2C8F692EE404A6E0A39B871E47BF5C

This is fixed by deleting vbk-testnet.spvchain and vbk-testnet.txmon.

Maybe a check can be added if the configured nodecore is of the same network type as configured in application.conf.

BernatCarbo commented 4 years ago

Solved at https://github.com/VeriBlock/nodecore/commit/6ca222298cd494638be8a5e1c793240607feae80