8000 chore: log `app_hash` as hex by julienrbrt · Pull Request #1264 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: log app_hash as hex #1264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[state]` Make logging `block_app_hash` and `app_hash` consistent by logging them both as hex.
([\#1264](https://github.com/cometbft/cometbft/pull/1264))
4 changes: 2 additions & 2 deletions state/execution.go
8276
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ func (blockExec *BlockExecutor) ApplyBlock(
return state, fmt.Errorf("expected tx results length to match size of transactions in block. Expected %d, got %d", len(block.Data.Txs), len(abciResponse.TxResults))
}

blockExec.logger.Info("executed block", "height", block.Height, "app_hash", abciResponse.AppHash)
blockExec.logger.Info("executed block", "height", block.Height, "app_hash", fmt.Sprintf("%X", abciResponse.AppHash))

fail.Fail() // XXX

Expand Down Expand Up @@ -705,7 +705,7 @@ func ExecCommitBlock(
return nil, fmt.Errorf("expected tx results length to match size of transactions in block. Expected %d, got %d", len(block.Data.Txs), len(resp.TxResults))
}

logger.Info("executed block", "height", block.Height, "app_hash", resp.AppHash)
logger.Info("executed block", "height", block.Height, "app_hash", fmt.Sprintf("%X", resp.AppHash))

// Commit block
_, err = appConnConsensus.Commit(context.TODO())
Expand Down
0