Skip to content

Commit

Permalink
Revert collapsing of pointers here, to reduce impact on calling code.
Browse files Browse the repository at this point in the history
  • Loading branch information
cgruber committed Nov 12, 2024
1 parent c7cecd9 commit 52cca7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions deployment/keystone/changeset/update_don.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry"
)

var _ deployment.ChangeSet[UpdateDonRequest] = UpdateDon
var _ deployment.ChangeSet[*UpdateDonRequest] = UpdateDon

// CapabilityConfig is a struct that holds a capability and its configuration
type CapabilityConfig = internal.CapabilityConfig
Expand All @@ -22,8 +22,8 @@ type UpdateDonResponse struct {
// UpdateDon updates the capabilities of a Don
// This a complex action in practice that involves registering missing capabilities, adding the nodes, and updating
// the capabilities of the DON
func UpdateDon(env deployment.Environment, req UpdateDonRequest) (deployment.ChangesetOutput, error) {
_, err := internal.UpdateDon(env.Logger, &req)
func UpdateDon(env deployment.Environment, req *UpdateDonRequest) (deployment.ChangesetOutput, error) {
_, err := internal.UpdateDon(env.Logger, req)
if err != nil {
return deployment.ChangesetOutput{}, fmt.Errorf("failed to update don: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions deployment/keystone/changeset/update_node_capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/p2pkey"
)

var _ deployment.ChangeSet[MutateNodeCapabilitiesRequest] = UpdateNodeCapabilities
var _ deployment.ChangeSet[*MutateNodeCapabilitiesRequest] = UpdateNodeCapabilities

type P2PSignerEnc = internal.P2PSignerEnc

Expand Down Expand Up @@ -85,7 +85,7 @@ func (req *MutateNodeCapabilitiesRequest) updateNodeCapabilitiesImplRequest(e de
}

// UpdateNodeCapabilities updates the capabilities of nodes in the registry
func UpdateNodeCapabilities(env deployment.Environment, req MutateNodeCapabilitiesRequest) (deployment.ChangesetOutput, error) {
func UpdateNodeCapabilities(env deployment.Environment, req *MutateNodeCapabilitiesRequest) (deployment.ChangesetOutput, error) {
c, err := req.updateNodeCapabilitiesImplRequest(env)
if err != nil {
return deployment.ChangesetOutput{}, fmt.Errorf("failed to convert request: %w", err)
Expand Down

0 comments on commit 52cca7f

Please sign in to comment.