From 1c2318eed4009166e52f8c7f6605507e9ce9d5a8 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sun, 14 Jun 2020 22:40:52 +0300 Subject: [PATCH] netmode: use non-zero unittest network Using zero is a bit dangerous as it's the default type's value, so we can miss some uninitialized variables when testing. --- config/protocol.unit_testnet.yml | 2 +- pkg/config/netmode/netmode.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/protocol.unit_testnet.yml b/config/protocol.unit_testnet.yml index 3d68fd574..7eccfffbc 100644 --- a/config/protocol.unit_testnet.yml +++ b/config/protocol.unit_testnet.yml @@ -1,5 +1,5 @@ ProtocolConfiguration: - Magic: 0 + Magic: 42 SecondsPerBlock: 15 LowPriorityThreshold: 0.000 MemPoolSize: 50000 diff --git a/pkg/config/netmode/netmode.go b/pkg/config/netmode/netmode.go index f7faa5ae3..5b77244a4 100644 --- a/pkg/config/netmode/netmode.go +++ b/pkg/config/netmode/netmode.go @@ -10,7 +10,7 @@ const ( // PrivNet contains magic code usually used for NEO private networks. PrivNet Magic = 56753 // docker privnet // UnitTestNet is a stub magic code used for testing purposes. - UnitTestNet Magic = 0 + UnitTestNet Magic = 42 ) // Magic describes the network the blockchain will operate on.