Skip to content

Commit

Permalink
update api
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Sep 11, 2024
1 parent 875fad3 commit 6fd80d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ func (ms stmMultiStoreWrapper) GetObjKVStore(key storetypes.StoreKey) storetypes
}

// preEstimates returns a static estimation of the written keys for each transaction.
func preEstimates(txs []sdk.Tx, authStore, bankStore int, evmDenom string) map[int]map[int][]blockstm.Key {
estimates := make(map[int]map[int][]blockstm.Key, len(txs))
func preEstimates(txs []sdk.Tx, authStore, bankStore int, evmDenom string) map[int]blockstm.MultiLocations {
estimates := make(map[int]blockstm.MultiLocations, len(txs))
for i, tx := range txs {
feeTx, ok := tx.(sdk.FeeTx)
if !ok {
Expand All @@ -195,7 +195,7 @@ func preEstimates(txs []sdk.Tx, authStore, bankStore int, evmDenom string) map[i
continue
}

estimates[i] = map[int][]blockstm.Key{
estimates[i] = blockstm.MultiLocations{
authStore: {accKey},
bankStore: {balanceKey},
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ replace (
// use cosmos keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/cockroachdb/pebble => github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811
github.com/crypto-org-chain/go-block-stm => github.com/yihuang/go-block-stm v0.0.0-20240911041313-125b0407ba8d
github.com/crypto-org-chain/go-block-stm => github.com/yihuang/go-block-stm v0.0.0-20240911061126-1f831176379f
// release/v1.11.x
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1129,8 +1129,8 @@ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRT
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yihuang/cosmos-sdk v0.43.0-beta1.0.20240911025848-f57522de4210 h1:nIoK3o8/p8BRcYvpN9VyY3CAhyVuw5TH2HN3OPYoXAQ=
github.com/yihuang/cosmos-sdk v0.43.0-beta1.0.20240911025848-f57522de4210/go.mod h1:Rb43DdB0i/rKcCN69Tg2X3+zA4WhJ7MC8K3a6Ezh38E=
github.com/yihuang/go-block-stm v0.0.0-20240911041313-125b0407ba8d h1:b5qnRYfFkiSaFSa2y62zDZq2qhWImzpZvZrAVzjkpA8=
github.com/yihuang/go-block-stm v0.0.0-20240911041313-125b0407ba8d/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE=
github.com/yihuang/go-block-stm v0.0.0-20240911061126-1f831176379f h1:G17UpSucfm3SPCXdkJMrsAXJyXDJHsD5zWiQ6GUCwZ4=
github.com/yihuang/go-block-stm v0.0.0-20240911061126-1f831176379f/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down
4 changes: 2 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ schema = 3
version = "v0.0.24"
hash = "sha256-4vUukHONOjNn0qfQr4esK6TWfPWsIp+rbdz65og84lw="
[mod."github.com/crypto-org-chain/go-block-stm"]
version = "v0.0.0-20240911041313-125b0407ba8d"
hash = "sha256-9NnoM64Wg7ur1pvc23oCi56W5yTrLXLiTKLMet7xB4A="
version = "v0.0.0-20240911061126-1f831176379f"
hash = "sha256-lKkKqz9yb1Yto/TgTqTdFVIjUY6LlKM0knRqI1ne9Bg="
replaced = "github.com/yihuang/go-block-stm"
[mod."github.com/danieljoos/wincred"]
version = "v1.2.0"
Expand Down

0 comments on commit 6fd80d4

Please sign in to comment.