Merge remote-tracking branch 'origin/websockets' into develop

This commit is contained in:
Jae Kwon
2015-04-17 13:20:47 -07:00
27 changed files with 1015 additions and 247 deletions

View File

@ -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() {