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:
obscuren
2014-09-29 12:57:51 +02:00
parent ea0357bf02
commit ab6ede51d7
9 changed files with 323 additions and 181 deletions

View File

@ -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)}))
}
}
}