From 036e6301af123ddc7d33f45545bdc083d1573bd8 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Wed, 22 Jul 2015 13:41:31 +0200 Subject: cmd/geth, core, eth: Version 1.0.0 Genesis release. Closes #1402 Conflicts: cmd/geth/main.go --- eth/handler.go | 1 + eth/protocol.go | 2 +- eth/protocol_test.go | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'eth') diff --git a/eth/handler.go b/eth/handler.go index 5ea9a3fdb..f2ae2b6f7 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -95,6 +95,7 @@ func NewProtocolManager(networkId int, mux *event.TypeMux, txpool txPool, pow po newPeerCh: make(chan *peer, 1), txsyncCh: make(chan *txsync), quitSync: make(chan struct{}), + netId: networkId, } // Initiate a sub-protocol for every implemented version we can handle manager.SubProtocols = make([]p2p.Protocol, len(ProtocolVersions)) diff --git a/eth/protocol.go b/eth/protocol.go index 5e2454999..226b98360 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -30,7 +30,7 @@ var ProtocolVersions = []uint{61, 60} var ProtocolLengths = []uint64{9, 8} const ( - NetworkId = 0 + NetworkId = 1 ProtocolMaxMsgSize = 10 * 1024 * 1024 // Maximum cap on the size of a protocol message ) diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 7dcbc714c..4a6736b7a 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -60,7 +60,7 @@ func TestStatusMsgErrors(t *testing.T) { }, { code: StatusMsg, data: statusData{uint32(ProtocolVersions[0]), 999, td, currentBlock, genesis}, - wantError: errResp(ErrNetworkIdMismatch, "999 (!= 0)"), + wantError: errResp(ErrNetworkIdMismatch, "999 (!= 1)"), }, { code: StatusMsg, data: statusData{uint32(ProtocolVersions[0]), NetworkId, td, currentBlock, common.Hash{3}}, @@ -184,7 +184,7 @@ func newProtocolManagerForTesting(txAdded chan<- []*types.Transaction) *Protocol em = new(event.TypeMux) chain, _ = core.NewChainManager(db, db, db, core.FakePow{}, em) txpool = &fakeTxPool{added: txAdded} - pm = NewProtocolManager(0, em, txpool, core.FakePow{}, chain) + pm = NewProtocolManager(NetworkId, em, txpool, core.FakePow{}, chain) ) pm.Start() return pm -- cgit v1.2.3