Skip to content

Commit

Permalink
add comments to SendToEthereumHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Oct 13, 2021
1 parent d021d14 commit ac8dd24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x/cronos/keeper/evm_hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (suite *KeeperTestSuite) TestEvmHooks() {
},
},
{
"fail send to ethereum",
"fail send to ethereum", // gravity feature is removed
func() {
suite.SetupTest()
denom := "gravity0x0000000000000000000000000000000000000000"
Expand Down
3 changes: 3 additions & 0 deletions x/cronos/keeper/evm_log_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ func (h SendToEthereumHandler) EventID() common.Hash {
return SendToEthereumEvent.ID
}

// Handle returns error unconditionally.
// Since gravity bridge is removed and could be added later,
// we keep this event handler, but returns error unconditionally to prevent accidental access.
func (h SendToEthereumHandler) Handle(ctx sdk.Context, contract common.Address, data []byte) error {
return fmt.Errorf("native action %s is not implemented", SendToEthereumEventName)
}
Expand Down

0 comments on commit ac8dd24

Please sign in to comment.