Skip to content

Commit

Permalink
app hash
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitys7 committed Nov 7, 2023
1 parent d346ada commit 265dacf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ func (m *Manager) trySyncNextBlock(ctx context.Context, daHeight uint64) error {
if err != nil {
return fmt.Errorf("failed to save block: %w", err)
}
_, _, err = m.executor.Commit(ctx, newState, b, responses)
appHash, _, err := m.executor.Commit(ctx, newState, b, responses)
newState.AppHash = appHash

if err != nil {
return fmt.Errorf("failed to Commit: %w", err)
}
Expand Down Expand Up @@ -707,7 +709,8 @@ func (m *Manager) publishBlock(ctx context.Context) error {
m.pendingBlocks.addPendingBlock(block)

// Commit the new state and block which writes to disk on the proxy app
_, _, err = m.executor.Commit(ctx, newState, block, responses)
appHash, _, err := m.executor.Commit(ctx, newState, block, responses)
newState.AppHash = appHash
if err != nil {
return err
}
Expand Down

0 comments on commit 265dacf

Please sign in to comment.