-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ics29:fix: counterparty addr must contain channelID #937
Changes from 1 commit
2e07ac5
b0f21d3
b636a81
a8a4f57
2f5e11a
4d98361
dadf017
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,8 @@ func FeeEnabledKey(portID, channelID string) []byte { | |
} | ||
|
||
// KeyRelayerAddress returns the key for relayer address -> counteryparty address mapping | ||
func KeyRelayerAddress(address string) []byte { | ||
return []byte(fmt.Sprintf("%s/%s", RelayerAddressKeyPrefix, address)) | ||
func KeyRelayerAddress(address, channelID string) []byte { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I'd prefer this to be renamed as well. Perhaps |
||
return []byte(fmt.Sprintf("%s/%s/%s", RelayerAddressKeyPrefix, address, channelID)) | ||
} | ||
|
||
// KeyForwardRelayerAddress returns the key for packetID -> forwardAddress mapping | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,11 @@ const ( | |
) | ||
|
||
// NewMsgRegisterCounterpartyAddress creates a new instance of MsgRegisterCounterpartyAddress | ||
func NewMsgRegisterCounterpartyAddress(address, counterpartyAddress string) *MsgRegisterCounterpartyAddress { | ||
func NewMsgRegisterCounterpartyAddress(address, counterpartyAddress, channelID string) *MsgRegisterCounterpartyAddress { | ||
return &MsgRegisterCounterpartyAddress{ | ||
Address: address, | ||
CounterpartyAddress: counterpartyAddress, | ||
ChannelId: channelID, | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just realized I need to update the validation + tests here also |
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: addr is a strange var name now with the addition of channelID. Maybe rename to
relayer
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or
registeredRelayer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went with relayer