diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-04-12 18:14:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-12 18:14:18 +0800 |
commit | 0080d104ecb56bbf658c9d3fea231ba3da669529 (patch) | |
tree | 4343e97ae2d62343f988a63653bb20d52460d28b /dex/protocol_test.go | |
parent | 976b7ed1734170925299f1c6c05a5e12a518150b (diff) | |
download | dexon-0080d104ecb56bbf658c9d3fea231ba3da669529.tar dexon-0080d104ecb56bbf658c9d3fea231ba3da669529.tar.gz dexon-0080d104ecb56bbf658c9d3fea231ba3da669529.tar.bz2 dexon-0080d104ecb56bbf658c9d3fea231ba3da669529.tar.lz dexon-0080d104ecb56bbf658c9d3fea231ba3da669529.tar.xz dexon-0080d104ecb56bbf658c9d3fea231ba3da669529.tar.zst dexon-0080d104ecb56bbf658c9d3fea231ba3da669529.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") } |