consensus/bor: log err when commit span fails (#1413)

* consensus/bor: log err in commit span

* consensus/bor: fix lint
This commit is contained in:
Manav Darji 2025-01-27 16:45:42 +05:30 committed by GitHub
parent 3a3e619d4c
commit 4ef49519f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,6 +100,11 @@ func ApplyMessage(
log.Error("message execution failed on contract", "msgData", msg.Data)
}
// If there's error committing span, log it here. It won't be reported before because the return value is empty.
if bytes.Equal(msg.To().Bytes(), validatorContract.Bytes()) && err != nil {
log.Error("message execution failed on contract", "err", err)
}
// Update the state with pending changes
if err != nil {
state.Finalise(true)