Skip to content

Commit

Permalink
Merge pull request #644 from rocket-pool/v2-srwa-segfault
Browse files Browse the repository at this point in the history
Fixed segfault by populating nil pointer
  • Loading branch information
0xfornax authored Sep 4, 2024
2 parents da3cd20 + 7644016 commit 0fb3e6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rocketpool-daemon/api/node/set-rpl-withdrawal-address.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (c *nodeSetRplWithdrawalAddressContext) GetState(mc *batch.MultiCaller) {
c.node.IsRplWithdrawalAddressSet,
c.node.RplWithdrawalAddress,
c.node.PrimaryWithdrawalAddress,
c.node.RplStake,
)
}

Expand All @@ -90,6 +91,7 @@ func (c *nodeSetRplWithdrawalAddressContext) PrepareData(data *api.NodeSetRplWit
data.PrimaryAddressDiffers = (c.node.PrimaryWithdrawalAddress.Get() != c.nodeAddress || isRplWithdrawalAddressSet)
data.RplAddressDiffers = (isRplWithdrawalAddressSet && c.node.RplWithdrawalAddress.Get() != c.nodeAddress)
data.CanSet = !(data.PrimaryAddressDiffers || data.RplAddressDiffers)
data.RplStake = c.node.RplStake.Get()

if data.CanSet {
txInfo, err := c.node.SetRplWithdrawalAddress(c.address, c.confirm, opts)
Expand Down

0 comments on commit 0fb3e6f

Please sign in to comment.