chore: use comet api pkg instead of comet alias (#20614)

This commit is contained in:
Marko
2024-06-11 08:46:04 +00:00
committed by GitHub
parent 9e1d28e2a6
commit 28fa3b8dfc
86 changed files with 130 additions and 130 deletions
+5 -5
View File
@@ -1,11 +1,11 @@
package maps
import (
"crypto/sha256"
"encoding/binary"
cmtprotocrypto "github.com/cometbft/cometbft/api/cometbft/crypto/v1"
"github.com/cometbft/cometbft/crypto/merkle"
"github.com/cometbft/cometbft/crypto/tmhash"
"cosmossdk.io/store/internal/kv"
"cosmossdk.io/store/internal/tree"
@@ -36,11 +36,11 @@ func (sm *merkleMap) set(key string, value []byte) {
// The value is hashed, so you can check for equality with a cached value (say)
// and make a determination to fetch or not.
vhash := tmhash.Sum(value)
vhash := sha256.Sum256(value)
sm.kvs.Pairs = append(sm.kvs.Pairs, kv.Pair{
Key: byteKey,
Value: vhash,
Value: vhash[:],
})
}
@@ -97,11 +97,11 @@ func (sm *simpleMap) Set(key string, value []byte) {
// The value is hashed, so you can
// check for equality with a cached value (say)
// and make a determination to fetch or not.
vhash := tmhash.Sum(value)
vhash := sha256.Sum256(value)
sm.Kvs.Pairs = append(sm.Kvs.Pairs, kv.Pair{
Key: byteKey,
Value: vhash,
Value: vhash[:],
})
}