-
Notifications
You must be signed in to change notification settings - Fork 657
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
chore: modify connection keeper GetTimestampAtHeight to use the client state interface function #1666
chore: modify connection keeper GetTimestampAtHeight to use the client state interface function #1666
Conversation
@@ -34,4 +34,5 @@ var ( | |||
ErrInvalidSubstitute = sdkerrors.Register(SubModuleName, 27, "invalid client state substitute") | |||
ErrInvalidUpgradeProposal = sdkerrors.Register(SubModuleName, 28, "invalid upgrade proposal") | |||
ErrClientNotActive = sdkerrors.Register(SubModuleName, 29, "client is not active") | |||
ErrClientStateNotFound = sdkerrors.Register(SubModuleName, 30, "client state not found") |
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.
We already have ErrClientNotFound
above so I think we can probably just use that!
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'd also be okay with renaming ErrClientNotFound
to ErrClientStateNotFound
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'll do that, it's more explicit
"github.com/stretchr/testify/suite" | ||
|
||
"github.com/cosmos/ibc-go/v3/modules/core/03-connection/types" | ||
"github.com/cosmos/ibc-go/v3/modules/core/exported" | ||
ibctesting "github.com/cosmos/ibc-go/v3/testing" | ||
"github.com/stretchr/testify/suite" |
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: the testify
import should stay above and separated from ibc-go imports
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.
Excellent work! :)
Agree with @damiannolan's comments
@@ -34,4 +34,5 @@ var ( | |||
ErrInvalidSubstitute = sdkerrors.Register(SubModuleName, 27, "invalid client state substitute") | |||
ErrInvalidUpgradeProposal = sdkerrors.Register(SubModuleName, 28, "invalid upgrade proposal") | |||
ErrClientNotActive = sdkerrors.Register(SubModuleName, 29, "client is not active") | |||
ErrClientStateNotFound = sdkerrors.Register(SubModuleName, 30, "client state not found") |
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'd also be okay with renaming ErrClientNotFound
to ErrClientStateNotFound
@@ -177,6 +177,23 @@ func (suite *KeeperTestSuite) TestSendPacket() { | |||
packet = types.NewPacket(ibctesting.MockPacketData, 1, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, disabledTimeoutHeight, timestamp) | |||
channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) | |||
}, false}, | |||
{"timeout timestamp passed with solomachine", func() { |
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.
should we open an issue to add solomachine tests for timeout_test.go functions?
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.
LGTM!
…t state interface function (cosmos#1666) * updated connection keeper to use clientstate to get timestamp, updated tests
Description
closes: #876
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes