Skip to content

Commit

Permalink
Merge pull request #121 from hyperledger-labs/remove-client-id-param
Browse files Browse the repository at this point in the history
core: remove `clientID` from CreateMsgCreateClient

Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele authored Nov 8, 2023
2 parents 0f26fb7 + 1ed9373 commit 068d8f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chains/tendermint/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (pr *Prover) ProveState(ctx core.QueryContext, path string, value []byte) (
/* LightClient implementation */

// CreateMsgCreateClient creates a MsgCreateClient for the counterparty chain
func (pr *Prover) CreateMsgCreateClient(clientID string, selfHeader core.Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error) {
func (pr *Prover) CreateMsgCreateClient(selfHeader core.Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error) {
ubdPeriod, err := pr.chain.QueryUnbondingPeriod()
if err != nil {
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions core/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func CreateClients(src, dst *ProvableChain) error {
}

{
msg, err := dst.CreateMsgCreateClient(src.Path().ClientID, dstH, srcAddr)
msg, err := dst.CreateMsgCreateClient(dstH, srcAddr)
if err != nil {
logger.Error(
"failed to create client",
Expand All @@ -54,7 +54,7 @@ func CreateClients(src, dst *ProvableChain) error {
}

{
msg, err := src.CreateMsgCreateClient(dst.Path().ClientID, srcH, dstAddr)
msg, err := src.CreateMsgCreateClient(srcH, dstAddr)
if err != nil {
logger.Error(
"failed to create client",
Expand Down
2 changes: 1 addition & 1 deletion core/provers.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type LightClient interface {
FinalityAware

// CreateMsgCreateClient creates a MsgCreateClient for the counterparty chain
CreateMsgCreateClient(clientID string, selfHeader Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error)
CreateMsgCreateClient(selfHeader Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error)

// SetupHeadersForUpdate returns the finalized header and any intermediate headers needed to apply it to the client on the counterpaty chain
// The order of the returned header slice should be as: [<intermediate headers>..., <update header>]
Expand Down
2 changes: 1 addition & 1 deletion provers/mock/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (pr *Prover) SetupForRelay(ctx context.Context) error {
}

// CreateMsgCreateClient creates a MsgCreateClient for the counterparty chain
func (pr *Prover) CreateMsgCreateClient(clientID string, selfHeader core.Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error) {
func (pr *Prover) CreateMsgCreateClient(selfHeader core.Header, signer sdk.AccAddress) (*clienttypes.MsgCreateClient, error) {
h := selfHeader.(*mocktypes.Header)
clientState := &mocktypes.ClientState{
LatestHeight: h.Height,
Expand Down

0 comments on commit 068d8f2

Please sign in to comment.