-
Notifications
You must be signed in to change notification settings - Fork 413
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
faddat/re merge main #1274
faddat/re merge main #1274
Changes from all commits
b559ff5
d8526f4
f86e119
830095b
e14a5a6
d0495f9
3174135
4d91b31
c2695a9
ef051fd
2e7038a
265cd2f
ccd6037
bc40665
4e57195
3bed659
58c1e1a
1a91d7b
b8acd40
2dcfc91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -488,7 +488,7 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, | |
AppHash: chain.CurrentHeader.AppHash, | ||
LastResultsHash: tmhash.Sum([]byte("last_results_hash")), | ||
EvidenceHash: tmhash.Sum([]byte("evidence_hash")), | ||
ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck | ||
ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck // SA5011: possible nil pointer dereference | ||
} | ||
|
||
hhash := tmHeader.Hash() | ||
|
@@ -550,11 +550,11 @@ func (chain *TestChain) CreatePortCapability(scopedKeeper capabilitykeeper.Scope | |
_, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.PortPath(portID)) | ||
if !ok { | ||
// create capability using the IBC capability keeper | ||
cap, err := chain.App.ScopedIBCKeeper.NewCapability(chain.GetContext(), host.PortPath(portID)) | ||
portCap, err := chain.App.ScopedIBCKeeper.NewCapability(chain.GetContext(), host.PortPath(portID)) | ||
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. This and others: the |
||
require.NoError(chain.t, err) | ||
|
||
// claim capability using the scopedKeeper | ||
err = scopedKeeper.ClaimCapability(chain.GetContext(), cap, host.PortPath(portID)) | ||
err = scopedKeeper.ClaimCapability(chain.GetContext(), portCap, host.PortPath(portID)) | ||
require.NoError(chain.t, err) | ||
} | ||
|
||
|
@@ -564,10 +564,10 @@ func (chain *TestChain) CreatePortCapability(scopedKeeper capabilitykeeper.Scope | |
// GetPortCapability returns the port capability for the given portID. The capability must | ||
// exist, otherwise testing will fail. | ||
func (chain *TestChain) GetPortCapability(portID string) *capabilitytypes.Capability { | ||
cap, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.PortPath(portID)) | ||
portCap, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.PortPath(portID)) | ||
require.True(chain.t, ok) | ||
|
||
return cap | ||
return portCap | ||
} | ||
|
||
// CreateChannelCapability binds and claims a capability for the given portID and channelID | ||
|
@@ -578,9 +578,9 @@ func (chain *TestChain) CreateChannelCapability(scopedKeeper capabilitykeeper.Sc | |
// check if the portId is already binded, if not bind it | ||
_, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), capName) | ||
if !ok { | ||
cap, err := chain.App.ScopedIBCKeeper.NewCapability(chain.GetContext(), capName) | ||
portCap, err := chain.App.ScopedIBCKeeper.NewCapability(chain.GetContext(), capName) | ||
require.NoError(chain.t, err) | ||
err = scopedKeeper.ClaimCapability(chain.GetContext(), cap, capName) | ||
err = scopedKeeper.ClaimCapability(chain.GetContext(), portCap, capName) | ||
require.NoError(chain.t, err) | ||
} | ||
|
||
|
@@ -590,10 +590,10 @@ func (chain *TestChain) CreateChannelCapability(scopedKeeper capabilitykeeper.Sc | |
// GetChannelCapability returns the channel capability for the given portID and channelID. | ||
// The capability must exist, otherwise testing will fail. | ||
func (chain *TestChain) GetChannelCapability(portID, channelID string) *capabilitytypes.Capability { | ||
cap, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.ChannelCapabilityPath(portID, channelID)) | ||
chanCap, ok := chain.App.ScopedIBCKeeper.GetCapability(chain.GetContext(), host.ChannelCapabilityPath(portID, channelID)) | ||
require.True(chain.t, ok) | ||
|
||
return cap | ||
return chanCap | ||
} | ||
|
||
// GetTimeoutHeight is a convenience function which returns a IBC packet timeout height | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -217,11 +217,9 @@ func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error { | |||||
return err | ||||||
} | ||||||
|
||||||
if err := path.EndpointB.UpdateClient(); err != nil { | ||||||
return err | ||||||
} | ||||||
err := path.EndpointB.UpdateClient() | ||||||
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. This and others: no need to keep an var:
Suggested change
|
||||||
|
||||||
return nil | ||||||
return err | ||||||
} | ||||||
|
||||||
// ChanOpenInitOnBothChains initializes a channel on the source chain and counterparty chain | ||||||
|
@@ -242,11 +240,9 @@ func (coord *Coordinator) ChanOpenInitOnBothChains(path *Path) error { | |||||
return err | ||||||
} | ||||||
|
||||||
if err := path.EndpointB.UpdateClient(); err != nil { | ||||||
return err | ||||||
} | ||||||
err := path.EndpointB.UpdateClient() | ||||||
|
||||||
return nil | ||||||
return err | ||||||
} | ||||||
|
||||||
// RelayAndAckPendingPackets sends pending packages from path.EndpointA to the counterparty chain and acks | ||||||
|
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.
This comment is very confusing for me. Shouldn't it be
When set to true
? I saw this in the original doc as well. 🤷