diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-02-28 18:22:05 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-28 18:22:05 +0800 |
commit | 965407f2388b4da18fcc65f1e2caab3fdf5718e7 (patch) | |
tree | 6bc5102c4bc17b821aac9e7211f292d7325f900f /eth | |
parent | dc0a006c7cc4bb1a9690924bf0fd7a7da9d36384 (diff) | |
parent | 96ae35e2ac8c360781407d7294081aabdcbb3652 (diff) | |
download | go-tangerine-965407f2388b4da18fcc65f1e2caab3fdf5718e7.tar go-tangerine-965407f2388b4da18fcc65f1e2caab3fdf5718e7.tar.gz go-tangerine-965407f2388b4da18fcc65f1e2caab3fdf5718e7.tar.bz2 go-tangerine-965407f2388b4da18fcc65f1e2caab3fdf5718e7.tar.lz go-tangerine-965407f2388b4da18fcc65f1e2caab3fdf5718e7.tar.xz go-tangerine-965407f2388b4da18fcc65f1e2caab3fdf5718e7.tar.zst go-tangerine-965407f2388b4da18fcc65f1e2caab3fdf5718e7.zip |
Merge pull request #3709 from fjl/p2p-context-log
p2p, p2p/discover, p2p/nat: rework logging using context keys
Diffstat (limited to 'eth')
-rw-r--r-- | eth/peer.go | 2 | ||||
-rw-r--r-- | eth/protocol_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/eth/peer.go b/eth/peer.go index fcf528af6..e87438953 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -280,7 +280,7 @@ func (p *peer) readStatus(network int, status *statusData, genesis common.Hash) return errResp(ErrDecode, "msg %v: %v", msg, err) } if status.GenesisBlock != genesis { - return errResp(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock, genesis) + return errResp(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock[:8], genesis[:8]) } if int(status.NetworkId) != network { return errResp(ErrNetworkIdMismatch, "%d (!= %d)", status.NetworkId, network) diff --git a/eth/protocol_test.go b/eth/protocol_test.go index 43f336c32..253dcd8a7 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -63,7 +63,7 @@ func testStatusMsgErrors(t *testing.T, protocol int) { }, { code: StatusMsg, data: statusData{uint32(protocol), NetworkId, td, currentBlock, common.Hash{3}}, - wantError: errResp(ErrGenesisBlockMismatch, "0300000000000000000000000000000000000000000000000000000000000000 (!= %x)", genesis), + wantError: errResp(ErrGenesisBlockMismatch, "0300000000000000 (!= %x)", genesis[:8]), }, } |