Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
### Improvements

* [#1712](https://github.com/crypto-org-chain/cronos/pull/1712) Upgrade rocksdb to `v9.8.4`.
* [#1747](https://github.com/crypto-org-chain/cronos/pull/1747) Skip batch initialization and flush when fixdata with dry-run.

*Dec 2, 2024*

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ require (
cloud.google.com/go/storage v1.41.0 // indirect
cosmossdk.io/collections v0.4.0 // indirect
cosmossdk.io/depinject v1.0.0 // indirect
cosmossdk.io/x/tx v0.13.6-0.20241003112805-ff8789a02871 // indirect
cosmossdk.io/x/tx v0.13.7 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/DataDog/datadog-go v4.8.3+incompatible // indirect
Expand Down
5 changes: 3 additions & 2 deletions versiondb/go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module github.com/crypto-org-chain/cronos/versiondb

go 1.22.7
toolchain go1.23.1
go 1.22.11

toolchain go1.23.6

require (
cosmossdk.io/errors v1.0.1
Expand Down
11 changes: 8 additions & 3 deletions versiondb/tsrocksdb/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@
return err
}
}

if dryRun {
return nil
}

Check warning on line 246 in versiondb/tsrocksdb/store.go

View check run for this annotation

Codecov / codecov/patch

versiondb/tsrocksdb/store.go#L245-L246

Added lines #L245 - L246 were not covered by tests
return s.Flush()
}

Expand All @@ -252,8 +254,11 @@
return err
}

batch := grocksdb.NewWriteBatch()
defer batch.Destroy()
var batch *grocksdb.WriteBatch
if !dryRun {
batch = grocksdb.NewWriteBatch()
defer batch.Destroy()
}

prefix := storePrefix(storeName)
readOpts := grocksdb.NewDefaultReadOptions()
Expand Down
Loading