Skip to content

Commit

Permalink
fix: gravity message logging format (#1027)
Browse files Browse the repository at this point in the history
* fix: gravity message logging format

* fix: GCI
  • Loading branch information
byte-bandit authored Nov 6, 2023
1 parent b1dd505 commit 7c2741a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions x/evm/keeper/msg_assigner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
{
Expand Down Expand Up @@ -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{}

Expand Down Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions x/gravity/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
},
)
}
Expand Down

0 comments on commit 7c2741a

Please sign in to comment.