forked from TrueCloudLab/neoneo-go
core: adjust prevHeader nil check
prevHeader is never nil. Refs #3419 Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
parent
cd525a1df5
commit
5c408f7fe4
1 changed files with 1 additions and 6 deletions
|
@ -3017,12 +3017,7 @@ func (bc *Blockchain) verifyTxWitnesses(t *transaction.Transaction, block *block
|
|||
|
||||
// verifyHeaderWitnesses is a block-specific implementation of VerifyWitnesses logic.
|
||||
func (bc *Blockchain) verifyHeaderWitnesses(currHeader, prevHeader *block.Header) error {
|
||||
var hash util.Uint160
|
||||
if prevHeader == nil && currHeader.PrevHash.Equals(util.Uint256{}) {
|
||||
hash = currHeader.Script.ScriptHash()
|
||||
} else {
|
||||
hash = prevHeader.NextConsensus
|
||||
}
|
||||
hash := prevHeader.NextConsensus
|
||||
_, err := bc.VerifyWitness(hash, currHeader, &currHeader.Script, HeaderVerificationGasLimit)
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue