Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
add preblock
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Nov 1, 2023
1 parent f981084 commit 08e11ad
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cosmos/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,11 @@ func (m *Miner) PrepareProposal(
return nil, err
}

// We have to run the PreBlocker to get the chain into the state it'll
// be in when the EVM transaction actually runs.
// We have to run the PreBlocker && BeginBlocker to get the chain into the state
// it'll be in when the EVM transaction actually runs.
if _, err = m.app.PreBlocker(ctx, nil); err != nil {
return nil, err
}

// We have to run the BeginBlocker to get the chain into the state it'll
// be in when the EVM transaction actually runs.
if _, err = m.app.BeginBlocker(ctx); err != nil {
} else if _, err = m.app.BeginBlocker(ctx); err != nil {
return nil, err
}

Expand Down

0 comments on commit 08e11ad

Please sign in to comment.