From b6aa88c099c16b38f0aebc749f7c95170426f787 Mon Sep 17 00:00:00 2001 From: zelig Date: Wed, 18 Mar 2015 14:44:58 +0700 Subject: private network support - protocolversion, networkid global int flags to cli and mist - fix bug with protocolversion check using wrong db - log protocolversion & networkid in backend --- eth/protocol_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'eth/protocol_test.go') diff --git a/eth/protocol_test.go b/eth/protocol_test.go index a2b59f117..4bed71663 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/errs" - "github.com/ethereum/go-ethereum/common" ethlogger "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p" "github.com/ethereum/go-ethereum/p2p/discover" @@ -235,8 +235,8 @@ func TestStatusMsgErrors(t *testing.T) { var status statusMsgData eth.checkMsg(0, StatusMsg, &status) // first outgoing msg should be StatusMsg if status.TD.Cmp(td) != 0 || - status.ProtocolVersion != ProtocolVersion || - status.NetworkId != NetworkId || + status.ProtocolVersion != eth.ProtocolVersion || + status.NetworkId != eth.NetworkId || status.TD.Cmp(td) != 0 || bytes.Compare(status.CurrentBlock, currentBlock) != 0 || bytes.Compare(status.GenesisBlock, genesis) != 0 { -- cgit v1.2.3 From ca8d18417358906e32a33a7c03c51b6849c46dda Mon Sep 17 00:00:00 2001 From: zelig Date: Wed, 18 Mar 2015 16:31:49 +0700 Subject: fix eth tests --- eth/protocol_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'eth/protocol_test.go') diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 4bed71663..108fb4475 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -216,7 +216,7 @@ func (self *ethProtocolTester) checkMsg(i int, code uint64, val interface{}) (ms } func (self *ethProtocolTester) run() { - err := runEthProtocol(self.txPool, self.chainManager, self.blockPool, testPeer(), self.rw) + err := runEthProtocol(ProtocolVersion, NetworkId, self.txPool, self.chainManager, self.blockPool, testPeer(), self.rw) self.quit <- err } @@ -235,8 +235,8 @@ func TestStatusMsgErrors(t *testing.T) { var status statusMsgData eth.checkMsg(0, StatusMsg, &status) // first outgoing msg should be StatusMsg if status.TD.Cmp(td) != 0 || - status.ProtocolVersion != eth.ProtocolVersion || - status.NetworkId != eth.NetworkId || + status.ProtocolVersion != ProtocolVersion || + status.NetworkId != NetworkId || status.TD.Cmp(td) != 0 || bytes.Compare(status.CurrentBlock, currentBlock) != 0 || bytes.Compare(status.GenesisBlock, genesis) != 0 { -- cgit v1.2.3