From f9d94c7462bbb3a0c463427baefc68555f853dee Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 3 Apr 2015 17:19:09 +0200 Subject: [PATCH] do not include BlockEqualTS as valid uncles --- core/block_processor.go | 2 +- core/chain_manager.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/block_processor.go b/core/block_processor.go index 97c8855361..0a98f3e32e 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -342,7 +342,7 @@ func (sm *BlockProcessor) VerifyUncles(statedb *state.StateDB, block, parent *ty return UncleError(fmt.Sprintf("Uncle's parent unknown (%x)", uncle.ParentHash[0:4])) } - if err := sm.ValidateHeader(uncle, ancestorHeaders[uncle.ParentHash]); err != nil && err != BlockEqualTSErr { + if err := sm.ValidateHeader(uncle, ancestorHeaders[uncle.ParentHash]); err != nil { return ValidationError(fmt.Sprintf("%v", err)) } diff --git a/core/chain_manager.go b/core/chain_manager.go index d97a94b062..bf5ba9b405 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -448,7 +448,8 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { } if err == BlockEqualTSErr { - queue[i] = ChainSideEvent{block, logs} + //queue[i] = ChainSideEvent{block, logs} + // XXX silently discard it? continue }