diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-06-29 17:44:00 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-07-01 00:00:01 +0800 |
commit | 6fc85f1ec221f976399af071a75ad7264b0ee905 (patch) | |
tree | 6ef805673f49ae9662f5c724f917f88bbba9a023 /eth/protocol_test.go | |
parent | 2c8ed76e01161d9fe4e69064404cd888b4e327f3 (diff) | |
download | dexon-6fc85f1ec221f976399af071a75ad7264b0ee905.tar dexon-6fc85f1ec221f976399af071a75ad7264b0ee905.tar.gz dexon-6fc85f1ec221f976399af071a75ad7264b0ee905.tar.bz2 dexon-6fc85f1ec221f976399af071a75ad7264b0ee905.tar.lz dexon-6fc85f1ec221f976399af071a75ad7264b0ee905.tar.xz dexon-6fc85f1ec221f976399af071a75ad7264b0ee905.tar.zst dexon-6fc85f1ec221f976399af071a75ad7264b0ee905.zip |
eth: clean up peer struct a bit, fix double txn bcast
Diffstat (limited to 'eth/protocol_test.go')
-rw-r--r-- | eth/protocol_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 60fa35443..ffd4ca19f 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -43,11 +43,11 @@ func TestStatusMsgErrors(t *testing.T) { wantError: errResp(ErrProtocolVersionMismatch, "10 (!= 0)"), }, { - code: StatusMsg, data: statusMsgData{ProtocolVersion, 999, td, currentBlock, genesis}, + code: StatusMsg, data: statusMsgData{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: statusMsgData{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 |