diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-10-24 11:33:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-24 11:33:32 +0800 |
commit | 7df0bfd5be452d4467e7d6252ed9497ff85b613f (patch) | |
tree | 5fd3fb28e4dc4abf2cfde3287d9407369bdde806 /core/lattice-data.go | |
parent | 5212bb83e8c257cfd85f9e891740369ecad36a91 (diff) | |
download | tangerine-consensus-7df0bfd5be452d4467e7d6252ed9497ff85b613f.tar tangerine-consensus-7df0bfd5be452d4467e7d6252ed9497ff85b613f.tar.gz tangerine-consensus-7df0bfd5be452d4467e7d6252ed9497ff85b613f.tar.bz2 tangerine-consensus-7df0bfd5be452d4467e7d6252ed9497ff85b613f.tar.lz tangerine-consensus-7df0bfd5be452d4467e7d6252ed9497ff85b613f.tar.xz tangerine-consensus-7df0bfd5be452d4467e7d6252ed9497ff85b613f.tar.zst tangerine-consensus-7df0bfd5be452d4467e7d6252ed9497ff85b613f.zip |
core: reduce calls to Application.VerifyBlock (#247)
* remove sanity check when adding blocks.
* call VerifyBlock after lattice's sanity check.
* remove checkRelation flag.
Diffstat (limited to 'core/lattice-data.go')
-rw-r--r-- | core/lattice-data.go | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/core/lattice-data.go b/core/lattice-data.go index 31604a6..b0fe9cf 100644 --- a/core/lattice-data.go +++ b/core/lattice-data.go @@ -268,11 +268,6 @@ func (data *latticeData) addBlock( bAck *types.Block updated bool ) - // TODO(mission): sanity check twice, might hurt performance. - // If a block does not pass sanity check, report error. - if err = data.sanityCheck(block); err != nil { - return - } if err = data.chains[block.Position.ChainID].addBlock(block); err != nil { return } |