Conversation
WalkthroughThis change refactors the Changes
Sequence Diagram(s)sequenceDiagram
participant Test as TestStateIO
participant DS as InMemoryDatastore
participant Store as Store
participant State as State
Test->>DS: Initialize map datastore
Test->>Store: Create Store(DS)
Test->>State: Create stateFixture()
Test->>Store: Save(State)
Store->>DS: Put(state key, serialized state)
Test->>Store: Load()
Store->>DS: Get(state key)
Store-->>Test: Return loaded State
Test->>Test: Assert loaded State equals original
Assessment against linked issues
Possibly related PRs
Suggested reviewers
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 (4)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (9)
✨ 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 (
|
| github.com/spf13/pflag v1.0.6 // indirect | ||
| github.com/spf13/viper v1.19.0 // indirect | ||
| github.com/stretchr/testify v1.10.0 // indirect | ||
| github.com/stretchr/testify v1.10.0 |
| // Create a new Store with ABCI prefix | ||
| abciStore := NewStore(store) | ||
| rollkitStore := rstore.New(abciStore) | ||
| rollkitStore := rstore.New(store) |
There was a problem hiding this comment.
This line was the key problem. instead of the original store, the prefix store was used.
| // Store wraps a datastore with ABCI-specific functionality | ||
| type Store struct { | ||
| ds.Batching | ||
| prefixedStore ds.Batching |
There was a problem hiding this comment.
no need to have the abci store public at this stage when only load/save state is used
Resolves #76
Overview
Summary by CodeRabbit
Bug Fixes
Tests
Refactor