mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-02 05:16:10 +00:00
Merge remote-tracking branch 'origin/websockets' into develop
This commit is contained in:
+7
-3
@@ -82,7 +82,7 @@ func NewNode() *Node {
|
||||
|
||||
// add the event switch to all services
|
||||
// they should all satisfy events.Eventable
|
||||
SetEventSwitch(eventSwitch, pexReactor, bcReactor, mempoolReactor, consensusReactor)
|
||||
SetFireable(eventSwitch, pexReactor, bcReactor, mempoolReactor, consensusReactor)
|
||||
|
||||
return &Node{
|
||||
sw: sw,
|
||||
@@ -116,9 +116,9 @@ func (n *Node) Stop() {
|
||||
}
|
||||
|
||||
// Add the event switch to reactors, mempool, etc.
|
||||
func SetEventSwitch(evsw *events.EventSwitch, eventables ...events.Eventable) {
|
||||
func SetFireable(evsw *events.EventSwitch, eventables ...events.Eventable) {
|
||||
for _, e := range eventables {
|
||||
e.SetEventSwitch(evsw)
|
||||
e.SetFireable(evsw)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,6 +167,10 @@ func (n *Node) MempoolReactor() *mempl.MempoolReactor {
|
||||
return n.mempoolReactor
|
||||
}
|
||||
|
||||
func (n *Node) EventSwitch() *events.EventSwitch {
|
||||
return n.evsw
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
func RunNode() {
|
||||
|
||||
Reference in New Issue
Block a user