diff options
author | bojie <bojie@dexon.org> | 2019-01-14 20:42:15 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:56 +0800 |
commit | 2155bbd85373a8527e3b565f4316bc4f1517650a (patch) | |
tree | 2f64cbc5a6810aa496524c7509a4998847526123 /core/block_validator.go | |
parent | 3fcb8b6825b3c62c9890a5ca59594f1503e66893 (diff) | |
download | dexon-2155bbd85373a8527e3b565f4316bc4f1517650a.tar dexon-2155bbd85373a8527e3b565f4316bc4f1517650a.tar.gz dexon-2155bbd85373a8527e3b565f4316bc4f1517650a.tar.bz2 dexon-2155bbd85373a8527e3b565f4316bc4f1517650a.tar.lz dexon-2155bbd85373a8527e3b565f4316bc4f1517650a.tar.xz dexon-2155bbd85373a8527e3b565f4316bc4f1517650a.tar.zst dexon-2155bbd85373a8527e3b565f4316bc4f1517650a.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 { |