Dont store disconnected nodes with wrong version/invalid data...

This commit is contained in:
Manfred Karrer 2016-02-04 19:00:16 +01:00
parent a264fa4e0b
commit 2c8bc3053b
8 changed files with 99 additions and 68 deletions

View file

@ -39,9 +39,10 @@ public class Version {
public static int getP2PMessageVersion() {
// A changed NETWORK_PROTOCOL_VERSION for the serialized objects does not trigger reliable a disconnect.
// TODO investigate why, but java serialisation should be replaced anyway, so using one existing field
// TODO investigate why a changed NETWORK_PROTOCOL_VERSION for the serialized objects does not trigger
// reliable a disconnect., but java serialisation should be replaced anyway, so using one existing field
// for the version is fine.
// BTC_NETWORK_ID is 0, 1 or 2, we use for changes at NETWORK_PROTOCOL_VERSION a multiplication with 10
// to avoid conflicts:
// E.g. btc BTC_NETWORK_ID=1, NETWORK_PROTOCOL_VERSION=1 -> getNetworkId()=2;