From 8736108f7c793e57bb2fc01616ae082aa60f165a Mon Sep 17 00:00:00 2001 From: Christian Lohr Date: Mon, 6 Nov 2023 14:57:50 +0100 Subject: [PATCH 1/2] fix: gravity message logging format --- x/gravity/keeper/msg_server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x/gravity/keeper/msg_server.go b/x/gravity/keeper/msg_server.go index 23c15197..9ecb9453 100644 --- a/x/gravity/keeper/msg_server.go +++ b/x/gravity/keeper/msg_server.go @@ -157,9 +157,9 @@ func (k msgServer) claimHandlerCommon(ctx sdk.Context, msgAny *codectypes.Any, m // Emit the handle message event return ctx.EventManager().EmitTypedEvent( &types.EventClaim{ - Message: string(msg.GetType()), - ClaimHash: string(hash), - AttestationId: string(types.GetAttestationKey(msg.GetEventNonce(), hash)), + Message: msg.GetType().String(), + ClaimHash: fmt.Sprintf("%x", hash), + AttestationId: fmt.Sprintf("%x", types.GetAttestationKey(msg.GetEventNonce(), hash)), }, ) } From fbd18a5c8997785b2316a8e3c14b3c54e3af0aaa Mon Sep 17 00:00:00 2001 From: Christian Lohr Date: Mon, 6 Nov 2023 15:25:32 +0100 Subject: [PATCH 2/2] fix: GCI --- x/evm/keeper/msg_assigner_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/evm/keeper/msg_assigner_test.go b/x/evm/keeper/msg_assigner_test.go index aa90195d..0696e6c7 100644 --- a/x/evm/keeper/msg_assigner_test.go +++ b/x/evm/keeper/msg_assigner_test.go @@ -586,7 +586,7 @@ func TestPickValidatorForMessage(t *testing.T) { Uptime: "0.5", Fee: "0.5", }, - chainID: "test-chain", + chainID: "test-chain", expected: sdk.ValAddress("testvalidator1").String(), }, { @@ -620,7 +620,9 @@ func TestPickValidatorForMessage(t *testing.T) { expectedErr: errors.New("no snapshot found"), }, { - name: "assigns a consistent pseudo-random validator in the happy path when no weights exist (cold start)", + chainID: "test-chain", + expected: sdk.ValAddress("testvalidator1").String(), + name: "assigns a consistent pseudo-random validator in the happy path when no weights exist (cold start)", setup: func() MsgAssigner { msgAssigner := MsgAssigner{} @@ -663,8 +665,6 @@ func TestPickValidatorForMessage(t *testing.T) { return msgAssigner }, - chainID: "test-chain", - expected: sdk.ValAddress("testvalidator1").String(), }, { name: "applies validator filtering based on job requirements",