Working on new (blocking) event machine.
The new event machine will be used for loose coupling and handle the communications between the services: 1) Block pool finds blocks which "links" with our current canonical chain 2) Posts the blocks on to the event machine 3) State manager receives blocks & processes them 4) Broadcasts new post block event
This commit is contained in:
4
peer.go
4
peer.go
@ -554,7 +554,9 @@ func (self *Peer) FetchHashes() {
|
||||
blockPool.td = self.td
|
||||
|
||||
if !blockPool.HasLatestHash() {
|
||||
self.QueueMessage(ethwire.NewMessage(ethwire.MsgGetBlockHashesTy, []interface{}{self.lastReceivedHash, uint32(256)}))
|
||||
const amount = 256
|
||||
peerlogger.Debugf("Fetching hashes (%d)\n", amount)
|
||||
self.QueueMessage(ethwire.NewMessage(ethwire.MsgGetBlockHashesTy, []interface{}{self.lastReceivedHash, uint32(amount)}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user