mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-21 23:29:38 +00:00
core: always warn if accepted transaction fails verification
These warnings must be monitored by developers since it might be a sign of behaviour difference between Go and C# nodes. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
13020ccd02
commit
59c98c4d09
1 changed files with 5 additions and 2 deletions
|
@ -1515,9 +1515,12 @@ func (bc *Blockchain) AddBlock(block *block.Block) error {
|
|||
} else {
|
||||
err = bc.verifyAndPoolTx(tx, mp, bc)
|
||||
}
|
||||
if err != nil && bc.config.VerifyTransactions {
|
||||
if err != nil {
|
||||
if bc.config.VerifyTransactions {
|
||||
return fmt.Errorf("transaction %s failed to verify: %w", tx.Hash().StringLE(), err)
|
||||
}
|
||||
bc.log.Warn(fmt.Sprintf("transaction %s failed to verify: %s", tx.Hash().StringLE(), err))
|
||||
}
|
||||
}
|
||||
}
|
||||
return bc.storeBlock(block, mp)
|
||||
|
|
Loading…
Reference in a new issue