chore: use comet api pkg instead of comet alias (#20614)
This commit is contained in:
@@ -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[:],
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user