mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
bor: add more context to error - to understand where it happened (#8811)
This commit is contained in:
parent
19451ac610
commit
34b9a70b02
@ -998,11 +998,13 @@ func (c *Bor) Finalize(config *chain.Config, header *types.Header, state *state.
|
||||
if c.blockReader != nil {
|
||||
// check and commit span
|
||||
if err := c.checkAndCommitSpan(state, header, cx, syscall); err != nil {
|
||||
c.logger.Error("[bor] Error while committing span", "err", err)
|
||||
err := fmt.Errorf("Finalize.checkAndCommitSpan: %w", err)
|
||||
c.logger.Error("[bor] committing span", "err", err)
|
||||
return nil, types.Receipts{}, err
|
||||
}
|
||||
// commit states
|
||||
if err := c.CommitStates(state, header, cx, syscall); err != nil {
|
||||
err := fmt.Errorf("Finalize.CommitStates: %w", err)
|
||||
c.logger.Error("[bor] Error while committing states", "err", err)
|
||||
return nil, types.Receipts{}, err
|
||||
}
|
||||
@ -1062,12 +1064,14 @@ func (c *Bor) FinalizeAndAssemble(chainConfig *chain.Config, header *types.Heade
|
||||
if c.blockReader != nil {
|
||||
// check and commit span
|
||||
if err := c.checkAndCommitSpan(state, header, cx, syscall); err != nil {
|
||||
c.logger.Error("[bor] Error while committing span", "err", err)
|
||||
err := fmt.Errorf("FinalizeAndAssemble.checkAndCommitSpan: %w", err)
|
||||
c.logger.Error("[bor] committing span", "err", err)
|
||||
return nil, nil, types.Receipts{}, err
|
||||
}
|
||||
// commit states
|
||||
if err := c.CommitStates(state, header, cx, syscall); err != nil {
|
||||
c.logger.Error("[bor] Error while committing states", "err", err)
|
||||
err := fmt.Errorf("FinalizeAndAssemble.CommitStates: %w", err)
|
||||
c.logger.Error("[bor] committing states", "err", err)
|
||||
return nil, nil, types.Receipts{}, err
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user