aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-09 22:54:32 +0800
committerobscuren <geffobscura@gmail.com>2015-04-09 22:54:32 +0800
commit46898f1e554a87b88d722bcf0ef3bfb2c9974736 (patch)
tree569bdb123a071fc53f066c1f3b21bd381be12dc7 /core
parent0636e17dbee3accf6291000f0e4f4e713a97a207 (diff)
parentbe25396340598bc385788793c4176932afa80db8 (diff)
downloaddexon-46898f1e554a87b88d722bcf0ef3bfb2c9974736.tar
dexon-46898f1e554a87b88d722bcf0ef3bfb2c9974736.tar.gz
dexon-46898f1e554a87b88d722bcf0ef3bfb2c9974736.tar.bz2
dexon-46898f1e554a87b88d722bcf0ef3bfb2c9974736.tar.lz
dexon-46898f1e554a87b88d722bcf0ef3bfb2c9974736.tar.xz
dexon-46898f1e554a87b88d722bcf0ef3bfb2c9974736.tar.zst
dexon-46898f1e554a87b88d722bcf0ef3bfb2c9974736.zip
Merge branch 'frontier/blockpool' of https://github.com/ethersphere/go-ethereum into ethersphere-frontier/blockpool
Diffstat (limited to 'core')
-rw-r--r--core/chain_manager.go1
-rw-r--r--core/types/block.go4
2 files changed, 5 insertions, 0 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go
index 9c66a9f53..5ad1dda83 100644
--- a/core/chain_manager.go
+++ b/core/chain_manager.go
@@ -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
diff --git a/core/types/block.go b/core/types/block.go
index 116acbf79..c47b555ed 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -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) }