mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 08:51:32 +00:00
Merge remote-tracking branch 'origin/websockets' into develop
This commit is contained in:
10
node/node.go
10
node/node.go
@ -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