refactor(x/evidence)!: use KVStoreService and context.Context (#16008)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
This commit is contained in:
co-authored by
marbar3778
parent
09ca393a19
commit
3c4330680f
@@ -1,6 +1,7 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"testing"
|
||||
@@ -120,7 +121,7 @@ func initFixture(t testing.TB) *fixture {
|
||||
|
||||
slashingKeeper := slashingkeeper.NewKeeper(cdc, codec.NewLegacyAmino(), keys[slashingtypes.StoreKey], stakingKeeper, authority.String())
|
||||
|
||||
evidenceKeeper := keeper.NewKeeper(cdc, keys[evidencetypes.StoreKey], stakingKeeper, slashingKeeper, address.NewBech32Codec("cosmos"), runtime.ProvideCometInfoService())
|
||||
evidenceKeeper := keeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[evidencetypes.StoreKey]), stakingKeeper, slashingKeeper, address.NewBech32Codec("cosmos"), runtime.ProvideCometInfoService())
|
||||
router := evidencetypes.NewRouter()
|
||||
router = router.AddRoute(evidencetypes.RouteEquivocation, testEquivocationHandler(evidenceKeeper))
|
||||
evidenceKeeper.SetRouter(router)
|
||||
@@ -303,7 +304,7 @@ func newPubKey(pk string) (res cryptotypes.PubKey) {
|
||||
}
|
||||
|
||||
func testEquivocationHandler(_ interface{}) evidencetypes.Handler {
|
||||
return func(ctx sdk.Context, e exported.Evidence) error {
|
||||
return func(ctx context.Context, e exported.Evidence) error {
|
||||
if err := e.ValidateBasic(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user