Merge branch 'frontier/blockpool' of https://github.com/ethersphere/go-ethereum into ethersphere-frontier/blockpool
This commit is contained in:
@ -463,6 +463,7 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
|
||||
// Do not penelise on future block. We'll need a block queue eventually that will queue
|
||||
// future block for future use
|
||||
if err == BlockFutureErr {
|
||||
block.SetQueued(true)
|
||||
self.futureBlocks.Push(block)
|
||||
stats.queued++
|
||||
continue
|
||||
|
@ -97,6 +97,7 @@ type Block struct {
|
||||
uncles []*Header
|
||||
transactions Transactions
|
||||
Td *big.Int
|
||||
queued bool // flag for blockpool to skip TD check
|
||||
|
||||
receipts Receipts
|
||||
}
|
||||
@ -268,6 +269,9 @@ func (self *Block) SetNonce(nonce uint64) {
|
||||
self.header.SetNonce(nonce)
|
||||
}
|
||||
|
||||
func (self *Block) Queued() bool { return self.queued }
|
||||
func (self *Block) SetQueued(q bool) { self.queued = q }
|
||||
|
||||
func (self *Block) Bloom() Bloom { return self.header.Bloom }
|
||||
func (self *Block) Coinbase() common.Address { return self.header.Coinbase }
|
||||
func (self *Block) Time() int64 { return int64(self.header.Time) }
|
||||
|
Reference in New Issue
Block a user