Skip to content

Commit

Permalink
fix: only add post values to proof if creation successful
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
  • Loading branch information
gballet committed Jan 7, 2025
1 parent b408f09 commit c620056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,

// Add the witness to the execution result
var statelessDiff verkle.StateDiff
if chainConfig.IsVerkle(big.NewInt(int64(pre.Env.Number)), pre.Env.Timestamp) {
if chainConfig.IsVerkle(big.NewInt(int64(pre.Env.Number)), pre.Env.Timestamp) && verkleProof != nil {
err = trie.AddPostValuesToProof(keys, proofTrie, verkleProof)
if err != nil {
return nil, nil, fmt.Errorf("error adding post values to proof: %w", err)
Expand Down

0 comments on commit c620056

Please sign in to comment.