diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-04-12 18:14:18 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-15 22:09:55 +0800 |
commit | d5daf97dba3156ef9adbf129a9d1e276f80d1095 (patch) | |
tree | 2d5d287865520cdb6fc6e6016e5010532e5e1e17 /dex/protocol_test.go | |
parent | 12de2a1841d7725750c2757629178fcf65c60152 (diff) | |
download | go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar.gz go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar.bz2 go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar.lz go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar.xz go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar.zst go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.zip |
dex: implement bad peer detect and disconnect mechanism (#360)
Diffstat (limited to 'dex/protocol_test.go')
-rw-r--r-- | dex/protocol_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dex/protocol_test.go b/dex/protocol_test.go index 3ed93c061..81550d918 100644 --- a/dex/protocol_test.go +++ b/dex/protocol_test.go @@ -271,7 +271,7 @@ func TestRecvCoreBlocks(t *testing.T) { ch := pm.ReceiveChan() select { case msg := <-ch: - rb := msg.(*coreTypes.Block) + rb := msg.Payload.(*coreTypes.Block) if !reflect.DeepEqual(rb, &block) { t.Errorf("block mismatch") } @@ -416,7 +416,7 @@ func TestRecvVotes(t *testing.T) { select { case msg := <-ch: - rvote := msg.(*coreTypes.Vote) + rvote := msg.Payload.(*coreTypes.Vote) if !reflect.DeepEqual(rvote, &vote) { t.Errorf("vote mismatch") } @@ -557,7 +557,7 @@ func TestRecvDKGPrivateShare(t *testing.T) { ch := pm.ReceiveChan() select { case msg := <-ch: - rps := msg.(*dkgTypes.PrivateShare) + rps := msg.Payload.(*dkgTypes.PrivateShare) if !reflect.DeepEqual(rps, &privateShare) { t.Errorf("vote mismatch") } @@ -657,7 +657,7 @@ func TestRecvAgreement(t *testing.T) { ch := pm.ReceiveChan() select { case msg := <-ch: - a := msg.(*coreTypes.AgreementResult) + a := msg.Payload.(*coreTypes.AgreementResult) if !reflect.DeepEqual(a, &agreement) { t.Errorf("agreement mismatch") } |