diff --git a/app/app.go b/app/app.go index ea34fda02..62c67a557 100644 --- a/app/app.go +++ b/app/app.go @@ -143,7 +143,6 @@ import ( _ "github.com/crypto-org-chain/chain-main/v4/app/docs/statik" memiavlstore "github.com/crypto-org-chain/cronos/store" - memiavlrootmulti "github.com/crypto-org-chain/cronos/store/rootmulti" ) // FIXME remove this line, dummy @@ -301,7 +300,7 @@ func New( legacyAmino := encodingConfig.Amino interfaceRegistry := encodingConfig.InterfaceRegistry - baseAppOptions = memiavlstore.SetupMemIAVL(logger, homePath, appOpts, baseAppOptions) + baseAppOptions = memiavlstore.SetupMemIAVL(logger, homePath, appOpts, true, baseAppOptions) bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) @@ -940,8 +939,8 @@ func StoreKeys() ( func (app *ChainApp) Close() error { err := app.BaseApp.Close() - if cms, ok := app.CommitMultiStore().(*memiavlrootmulti.Store); ok { - return errors.Join(err, cms.WaitAsyncCommit()) + if cms, ok := app.CommitMultiStore().(io.Closer); ok { + return errors.Join(err, cms.Close()) } return err diff --git a/go.mod b/go.mod index c3a88024d..f39627d85 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-alpha8 github.com/cosmos/cosmos-sdk v0.46.13 github.com/cosmos/ibc-go/v5 v5.2.1 - github.com/crypto-org-chain/cronos/store v0.0.3 + github.com/crypto-org-chain/cronos/store v0.0.4-0.20230701031330-91fbcb44fffb // release/v1.0.x github.com/crypto-org-chain/cronos/versiondb v0.0.0-20230623043455-e162787ed0b9 github.com/gogo/protobuf v1.3.3 @@ -73,7 +73,7 @@ require ( github.com/cosmos/iavl v0.19.6 // indirect github.com/cosmos/ledger-cosmos-go v0.12.2 // indirect github.com/creachadair/taskgroup v0.3.2 // indirect - github.com/crypto-org-chain/cronos/memiavl v0.0.3 // indirect + github.com/crypto-org-chain/cronos/memiavl v0.0.4-0.20230701031330-91fbcb44fffb // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect diff --git a/go.sum b/go.sum index 8072a29e0..6572a7fe1 100644 --- a/go.sum +++ b/go.sum @@ -420,10 +420,10 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/crypto-org-chain/cometbft-db v0.0.0-20230412133340-ac70df4b45f6 h1:d4h4Ki1UE/LF6CKwYEm3OZ+HIBCrzSmOokG1vce0O98= github.com/crypto-org-chain/cometbft-db v0.0.0-20230412133340-ac70df4b45f6/go.mod h1:hF5aclS++7WrW8USOA3zPeKI0CuzwUD2TPYug25ANlQ= -github.com/crypto-org-chain/cronos/memiavl v0.0.3 h1:oNKmV2Vp14eeW4zN/Wvr6H4iYJ5j2YTYZqQwzKNeblM= -github.com/crypto-org-chain/cronos/memiavl v0.0.3/go.mod h1:k3+p+k+HzXx+NoqULMKzai1WHm5z+9CYGO/T9EVbb4w= -github.com/crypto-org-chain/cronos/store v0.0.3 h1:sOn2lCHPIbbC+bVXg/d38M8wrlmSjJcHifeExQVPvdc= -github.com/crypto-org-chain/cronos/store v0.0.3/go.mod h1:jpkj59pegLuibS3LRb1ieD+tZG1qc78f4623fTyBa/4= +github.com/crypto-org-chain/cronos/memiavl v0.0.4-0.20230701031330-91fbcb44fffb h1:R7un4w087nBF3L+NH2NlmZD9G3RiTNIGfsK2iew7DUw= +github.com/crypto-org-chain/cronos/memiavl v0.0.4-0.20230701031330-91fbcb44fffb/go.mod h1:k3+p+k+HzXx+NoqULMKzai1WHm5z+9CYGO/T9EVbb4w= +github.com/crypto-org-chain/cronos/store v0.0.4-0.20230701031330-91fbcb44fffb h1:hmi5zBbZfoHNB5cS5a+ftnm4OuWSPmS+uevRSkTydIM= +github.com/crypto-org-chain/cronos/store v0.0.4-0.20230701031330-91fbcb44fffb/go.mod h1:jpkj59pegLuibS3LRb1ieD+tZG1qc78f4623fTyBa/4= github.com/crypto-org-chain/cronos/versiondb v0.0.0-20230623043455-e162787ed0b9 h1:kgdqW/ZIn1DmYh6795XqwNJfTSFVfFIts7XTsw09NlQ= github.com/crypto-org-chain/cronos/versiondb v0.0.0-20230623043455-e162787ed0b9/go.mod h1:nJHTLUNSMpAGenR70PTAv7bZu0jCU+iIuQCe4O+r3co= github.com/crypto-org-chain/tm-db v0.6.8-0.20230424032152-87c7e7f4fb61 h1:Y5OuzOkZtjCfO53Jgzl+H8re6pOU4X205a1VMkDcUdk= diff --git a/gomod2nix.toml b/gomod2nix.toml index b74ad3755..c51df1f4a 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -137,11 +137,11 @@ schema = 3 version = "v0.3.2" hash = "sha256-Y261IO/d9xjV0UScqHvo31broxvnKn4IQQC9Mu6jNkE=" [mod."github.com/crypto-org-chain/cronos/memiavl"] - version = "v0.0.3" - hash = "sha256-sWn4b1C+UDc94ccT1YZPshyx6DWxqH/jCGrw5AishFU=" + version = "v0.0.4-0.20230701031330-91fbcb44fffb" + hash = "sha256-bhf0qfAqoCN9ZU6aaGOBSN8qFfEDQMwIWwCWrFC9ph0=" [mod."github.com/crypto-org-chain/cronos/store"] - version = "v0.0.3" - hash = "sha256-oDbvuSVeK2nPcmWaLfMIHBztuDl3Mm1K2sYNlC9j27U=" + version = "v0.0.4-0.20230701031330-91fbcb44fffb" + hash = "sha256-aa6xwd+R//lvcYAg0nwSDJk5fNLKNdyv9qnVkfm5q+4=" [mod."github.com/crypto-org-chain/cronos/versiondb"] version = "v0.0.0-20230623043455-e162787ed0b9" hash = "sha256-Z+uXkJk9zUrR5uf7MHsaDX27suu3DJO4CBgcA8TG20I="