aboutsummaryrefslogtreecommitdiffstats
path: root/eth/protocol_test.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-01 23:16:44 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-01 23:16:44 +0800
commit5caff3bc247cdd71f2342093d276041afe898ab3 (patch)
treea771298f17987eba6fb05d7bac1e772121296856 /eth/protocol_test.go
parent507869bff10adab3d4f183aeaf3ef31715041046 (diff)
parentd6f2c0a76f6635ebeb245815c5f686c545ed527d (diff)
downloaddexon-5caff3bc247cdd71f2342093d276041afe898ab3.tar
dexon-5caff3bc247cdd71f2342093d276041afe898ab3.tar.gz
dexon-5caff3bc247cdd71f2342093d276041afe898ab3.tar.bz2
dexon-5caff3bc247cdd71f2342093d276041afe898ab3.tar.lz
dexon-5caff3bc247cdd71f2342093d276041afe898ab3.tar.xz
dexon-5caff3bc247cdd71f2342093d276041afe898ab3.tar.zst
dexon-5caff3bc247cdd71f2342093d276041afe898ab3.zip
Merge pull request #1351 from karalabe/eth61
Implement eth/61
Diffstat (limited to 'eth/protocol_test.go')
-rw-r--r--eth/protocol_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/eth/protocol_test.go b/eth/protocol_test.go
index 60fa35443..4c1579d4e 100644
--- a/eth/protocol_test.go
+++ b/eth/protocol_test.go
@@ -39,15 +39,15 @@ func TestStatusMsgErrors(t *testing.T) {
wantError: errResp(ErrNoStatusMsg, "first msg has code 2 (!= 0)"),
},
{
- code: StatusMsg, data: statusMsgData{10, NetworkId, td, currentBlock, genesis},
+ code: StatusMsg, data: statusData{10, NetworkId, td, currentBlock, genesis},
wantError: errResp(ErrProtocolVersionMismatch, "10 (!= 0)"),
},
{
- code: StatusMsg, data: statusMsgData{ProtocolVersion, 999, td, currentBlock, genesis},
+ code: StatusMsg, data: statusData{uint32(ProtocolVersions[0]), 999, td, currentBlock, genesis},
wantError: errResp(ErrNetworkIdMismatch, "999 (!= 0)"),
},
{
- code: StatusMsg, data: statusMsgData{ProtocolVersion, NetworkId, td, currentBlock, common.Hash{3}},
+ code: StatusMsg, data: statusData{uint32(ProtocolVersions[0]), NetworkId, td, currentBlock, common.Hash{3}},
wantError: errResp(ErrGenesisBlockMismatch, "0300000000000000000000000000000000000000000000000000000000000000 (!= %x)", genesis),
},
}
@@ -167,7 +167,7 @@ func newProtocolManagerForTesting(txAdded chan<- []*types.Transaction) *Protocol
db, _ = ethdb.NewMemDatabase()
chain, _ = core.NewChainManager(core.GenesisBlock(0, db), db, db, core.FakePow{}, em)
txpool = &fakeTxPool{added: txAdded}
- pm = NewProtocolManager(ProtocolVersion, 0, em, txpool, core.FakePow{}, chain)
+ pm = NewProtocolManager(0, em, txpool, core.FakePow{}, chain)
)
pm.Start()
return pm
@@ -188,7 +188,7 @@ func newTestPeer(pm *ProtocolManager) (*testPeer, <-chan error) {
func (p *testPeer) handshake(t *testing.T) {
td, currentBlock, genesis := p.pm.chainman.Status()
- msg := &statusMsgData{
+ msg := &statusData{
ProtocolVersion: uint32(p.pm.protVer),
NetworkId: uint32(p.pm.netId),
TD: td,