feat: replace the cosmos-db.DB interface with core/store interface (#21450)

This commit is contained in:
cool-developer
2024-08-30 21:25:25 +00:00
committed by GitHub
parent f843f1a478
commit ce4fb98cb8
119 changed files with 553 additions and 550 deletions
+1 -1
View File
@@ -618,7 +618,7 @@ e.g. in `NewSimApp`:
```go
func NewSimApp(
logger log.Logger,
db dbm.DB,
db corestore.KVStoreWithBatch,
traceStore io.Writer,
loadLatest bool,
appOpts servertypes.AppOptions,
+1 -1
View File
@@ -108,7 +108,7 @@ Finally, a few more important parameters:
```go
func NewBaseApp(
name string, logger log.Logger, db dbm.DB, txDecoder sdk.TxDecoder, options ...func(*BaseApp),
name string, logger log.Logger, db corestore.KVStoreWithBatch, txDecoder sdk.TxDecoder, options ...func(*BaseApp),
) *BaseApp {
// ...
+2 -2
View File
@@ -141,13 +141,13 @@ The documentation on the IAVL Tree is located [here](https://github.com/cosmos/i
### `DbAdapter` Store
`dbadapter.Store` is an adapter for `dbm.DB` making it fulfilling the `KVStore` interface.
`dbadapter.Store` is an adapter for `corestore.KVStoreWithBatch` making it fulfilling the `KVStore` interface.
```go reference
https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-alpha.0/store/dbadapter/store.go#L13-L16
```
`dbadapter.Store` embeds `dbm.DB`, meaning most of the `KVStore` interface functions are implemented. The other functions (mostly miscellaneous) are manually implemented. This store is primarily used within [Transient Stores](#transient-store)
`dbadapter.Store` embeds `corestore.KVStoreWithBatch`, meaning most of the `KVStore` interface functions are implemented. The other functions (mostly miscellaneous) are manually implemented. This store is primarily used within [Transient Stores](#transient-store)
### `Transient` Store