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/network.go | |
parent | 12de2a1841d7725750c2757629178fcf65c60152 (diff) | |
download | go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar.gz go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.tar.zst go-tangerine-d5daf97dba3156ef9adbf129a9d1e276f80d1095.zip |
dex: implement bad peer detect and disconnect mechanism (#360)
Diffstat (limited to 'dex/network.go')
-rw-r--r-- | dex/network.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dex/network.go b/dex/network.go index 0e2d338c1..ab676a349 100644 --- a/dex/network.go +++ b/dex/network.go @@ -84,6 +84,11 @@ func (n *DexconNetwork) BroadcastAgreementResult(result *types.AgreementResult) } // ReceiveChan returns a channel to receive messages from DEXON network. -func (n *DexconNetwork) ReceiveChan() <-chan interface{} { +func (n *DexconNetwork) ReceiveChan() <-chan types.Msg { return n.pm.ReceiveChan() } + +// ReportBadPeerChan returns a channel to receive messages from DEXON network. +func (n *DexconNetwork) ReportBadPeerChan() chan<- interface{} { + return n.pm.ReportBadPeerChan() +} |