test: fix TestExecuteFiresEvents#136
Conversation
WalkthroughThe test Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (1.64.8)Error: you are using a configuration file for golangci-lint v2 with golangci-lint v1: please use golangci-lint v2 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/adapter/adapter_test.go (1)
89-99: Minor: simplify PubKey conversionYou can avoid the temporary
cometBftPubKeyvariable and the raw-byte detour:- pubKeyRaw, err := pubKey.Raw() - require.NoError(t, err) - cometBftPubKey = pubKeyRaw + cometBftPubKey := tmcryptoed25519.PubKey(pubKey[0:]) // direct cast to CometBFT typeThis removes one allocation and keeps the intent clear.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pkg/adapter/adapter_test.go(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
pkg/adapter/adapter_test.go (1)
pkg/cometcompat/signer.go (1)
PayloadProvider(10-33)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: lint / golangci-lint
- GitHub Check: test / Run Unit Tests
- GitHub Check: Test with Rollkit Chain
🔇 Additional comments (1)
pkg/adapter/adapter_test.go (1)
113-121: Signature type mismatch may lead to inconsistent data in the store
signedHeader.Signatureis set to the raw[]byte(sig), whileSaveBlockDatareceives*types.Signature.
Iftypes.SignedHeader.Signatureis also expected to be atypes.Signature, this asymmetry could break later verification steps.Please confirm the expected types; if necessary:
- signedHeader := &types.SignedHeader{ - Header: header, - Signer: signer, - Signature: sig, - } + signedHeader := &types.SignedHeader{ + Header: header, + Signer: signer, + Signature: sigT, + }and drop the
&sigTargument when callingSaveBlockData.
* test: fix TestExecuteFiresEvents * fix test * lint
* test: fix TestExecuteFiresEvents * fix test * lint
ref: #133
Summary by CodeRabbit