diff options
author | bojie <bojie@dexon.org> | 2019-01-14 20:42:15 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:21 +0800 |
commit | f587289bc3d5f679c6e92acb817a40a88a19e970 (patch) | |
tree | 55b30e09ee4222973fc935ba83c08ac6f13a24dd /core/block_validator.go | |
parent | 2b03b31d46e166e70ea82b806db47bb6408282e3 (diff) | |
download | go-tangerine-f587289bc3d5f679c6e92acb817a40a88a19e970.tar go-tangerine-f587289bc3d5f679c6e92acb817a40a88a19e970.tar.gz go-tangerine-f587289bc3d5f679c6e92acb817a40a88a19e970.tar.bz2 go-tangerine-f587289bc3d5f679c6e92acb817a40a88a19e970.tar.lz go-tangerine-f587289bc3d5f679c6e92acb817a40a88a19e970.tar.xz go-tangerine-f587289bc3d5f679c6e92acb817a40a88a19e970.tar.zst go-tangerine-f587289bc3d5f679c6e92acb817a40a88a19e970.zip |
app: remove pending block logic (#149)
Diffstat (limited to 'core/block_validator.go')
-rw-r--r-- | core/block_validator.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/core/block_validator.go b/core/block_validator.go index 660bd09f8..c6038381f 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -102,12 +102,9 @@ func (v *BlockValidator) ValidateState(block, parent *types.Block, statedb *stat } func (v *BlockValidator) ValidateWitnessData(height uint64, data types.WitnessData) error { - b := v.bc.GetPendingBlockByNumber(height) + b := v.bc.GetBlockByNumber(height) if b == nil { - b = v.bc.GetBlockByNumber(height) - if b == nil { - return fmt.Errorf("can not find block %v either pending or confirmed block", height) - } + return fmt.Errorf("can not find block %v either pending or confirmed block", height) } if b.Root() != data.Root { |