diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-17 14:28:19 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 13:50:04 +0800 |
commit | 963c79c325e8f1c10321bb0c69ec32607c24d3ab (patch) | |
tree | d3bebdbff40faefda94fa99de15af99f6e6d6e37 /dex/handler.go | |
parent | 74f23bef7863264e7ade5ca916a2504f835196ae (diff) | |
download | dexon-963c79c325e8f1c10321bb0c69ec32607c24d3ab.tar dexon-963c79c325e8f1c10321bb0c69ec32607c24d3ab.tar.gz dexon-963c79c325e8f1c10321bb0c69ec32607c24d3ab.tar.bz2 dexon-963c79c325e8f1c10321bb0c69ec32607c24d3ab.tar.lz dexon-963c79c325e8f1c10321bb0c69ec32607c24d3ab.tar.xz dexon-963c79c325e8f1c10321bb0c69ec32607c24d3ab.tar.zst dexon-963c79c325e8f1c10321bb0c69ec32607c24d3ab.zip |
dex: properly start and stop the block proposer module (#264)
Stop blockproposer in the Stop() method of node service so the process
doens't hang.
Diffstat (limited to 'dex/handler.go')
-rw-r--r-- | dex/handler.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dex/handler.go b/dex/handler.go index ea04e6fbc..91d7360b2 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -310,6 +310,10 @@ func (pm *ProtocolManager) Stop() { pm.txsSub.Unsubscribe() // quits txBroadcastLoop pm.chainHeadSub.Unsubscribe() + if pm.isBlockProposer { + pm.finalizedBlockSub.Unsubscribe() + } + // Quit the sync loop. // After this send has completed, no new peers will be accepted. pm.noMorePeers <- struct{}{} |