diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-06 14:32:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-06 14:32:02 +0800 |
commit | aff897fd2385152a7bfd8a8ac0846ef5ad736b96 (patch) | |
tree | 157553a47753be3ec28673743a8b2065dc4a3966 /core | |
parent | 490aa470a70bed5176b2c598174e260b4e4ebf49 (diff) | |
download | dexon-consensus-aff897fd2385152a7bfd8a8ac0846ef5ad736b96.tar dexon-consensus-aff897fd2385152a7bfd8a8ac0846ef5ad736b96.tar.gz dexon-consensus-aff897fd2385152a7bfd8a8ac0846ef5ad736b96.tar.bz2 dexon-consensus-aff897fd2385152a7bfd8a8ac0846ef5ad736b96.tar.lz dexon-consensus-aff897fd2385152a7bfd8a8ac0846ef5ad736b96.tar.xz dexon-consensus-aff897fd2385152a7bfd8a8ac0846ef5ad736b96.tar.zst dexon-consensus-aff897fd2385152a7bfd8a8ac0846ef5ad736b96.zip |
core: only check block hash and signature for pulled baConfirmed block (#464)
Diffstat (limited to 'core')
-rw-r--r-- | core/consensus.go | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/core/consensus.go b/core/consensus.go index 370df72..0f665f2 100644 --- a/core/consensus.go +++ b/core/consensus.go @@ -891,13 +891,11 @@ MessageLoop: ch, e := con.baConfirmedBlock[val.Hash] return ch, e }(); exist { - if err := con.bcModule.sanityCheck(val); err != nil { - if err == ErrRetrySanityCheckLater { - err = nil - } else { - con.logger.Error("SanityCheck failed", "error", err) - continue MessageLoop - } + if err := utils.VerifyBlockSignature(val); err != nil { + con.logger.Error("VerifyBlockSignature failed", + "block", val, + "error", err) + continue MessageLoop } func() { con.lock.Lock() |