PoC 6 networking code.

* Added block pool for gathering blocks from the network (chunks)
* Re wrote syncing
This commit is contained in:
obscuren
2014-08-21 14:47:58 +02:00
parent 79c64f6bca
commit eaa2e8900d
7 changed files with 296 additions and 197 deletions

View File

@ -54,6 +54,8 @@ type Ethereum struct {
txPool *ethchain.TxPool
// The canonical chain
blockChain *ethchain.BlockChain
// The block pool
blockPool *BlockPool
// Peers (NYI)
peers *list.List
// Nonce
@ -116,6 +118,7 @@ func New(db ethutil.Database, clientIdentity ethwire.ClientIdentity, keyManager
}
ethereum.reactor = ethreact.New()
ethereum.blockPool = NewBlockPool(ethereum)
ethereum.txPool = ethchain.NewTxPool(ethereum)
ethereum.blockChain = ethchain.NewBlockChain(ethereum)
ethereum.stateManager = ethchain.NewStateManager(ethereum)