Skip to content

Commit

Permalink
Changes based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amsanghi committed Nov 19, 2024
1 parent d0aed85 commit 2c34a6d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1342,11 +1342,14 @@ func (s *StateDB) Commit(block uint64, deleteEmptyObjects bool) (common.Hash, er
s.arbExtraData.activatedWasms = make(map[common.Hash]ActivatedWasm)
}

if wasmCodeWriter.ValueSize() > 0 {
if err := wasmCodeWriter.Write(); err != nil {
log.Crit("Failed to commit dirty stylus codes", "error", err)
workers.Go(func() error {
if wasmCodeWriter.ValueSize() > 0 {
if err := wasmCodeWriter.Write(); err != nil {
log.Crit("Failed to commit dirty stylus codes", "error", err)
}
}
}
return nil
})
// Wait for everything to finish and update the metrics
if err := workers.Wait(); err != nil {
return common.Hash{}, err
Expand Down

0 comments on commit 2c34a6d

Please sign in to comment.