Skip to content

Commit 88472ed

Browse files
committed
Merge branch 'master' into jms/monorepo-saturn
1 parent d139e75 commit 88472ed

2 files changed

Lines changed: 13 additions & 10 deletions

File tree

go.work

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ use (
1111
replace github.com/wealdtech/go-merkletree v1.0.1-0.20190605192610-2bb163c2ea2a => github.com/rocket-pool/go-merkletree v1.0.1-0.20220406020931-c262d9b976dd
1212

1313
replace github.com/rocket-pool/smartnode => ./
14+
15+
// replace github.com/rocket-pool/rocketpool-go => ../rocketpool-go

rocketpool/watchtower/submit-rpl-price.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -375,29 +375,30 @@ func (t *submitRplPrice) run(state *state.NetworkState) error {
375375
eth2Config := state.BeaconConfig
376376

377377
var hasSubmittedPastBlock bool
378+
var eventFound bool
378379
var nextSubmissionTime time.Time
379380
var targetBlockNumber uint64
380381
var lastSubmissionSlotTimestamp uint64
381382
// Check if the node has submitted prices for the latest block
382383
if lastSubmissionBlock != 0 {
383-
found, lastSubmissionEvent, err := network.GetPriceUpdatedEvent(t.rp, lastSubmissionBlock, nil)
384+
eventFound, lastSubmissionEvent, err := network.GetPriceUpdatedEvent(t.rp, lastSubmissionBlock, nil)
384385
if err != nil {
385386
t.log.Printlnf("Error getting price submission event for block %d", lastSubmissionBlock)
386387
return err
387388
}
388-
if !found {
389+
if !eventFound {
389390
t.log.Printlnf("No price submission event found for block %d", lastSubmissionBlock)
390-
return fmt.Errorf("no price submission event found for block %d", lastSubmissionBlock)
391-
}
392-
lastSubmissionSlotTimestamp = lastSubmissionEvent.SlotTimestamp.Uint64()
391+
} else {
392+
lastSubmissionSlotTimestamp = lastSubmissionEvent.SlotTimestamp.Uint64()
393393

394-
hasSubmittedPastBlock, err = t.hasSubmittedSpecificBlockPrices(nodeAccount.Address, lastSubmissionBlock, lastSubmissionSlotTimestamp, state.NetworkDetails.RplPrice)
395-
if err != nil {
396-
t.log.Printlnf("Error checking if node has submitted prices for block %d: %s", lastSubmissionBlock, err.Error())
397-
return err
394+
hasSubmittedPastBlock, err = t.hasSubmittedSpecificBlockPrices(nodeAccount.Address, lastSubmissionBlock, lastSubmissionSlotTimestamp, state.NetworkDetails.RplPrice)
395+
if err != nil {
396+
t.log.Printlnf("Error checking if node has submitted prices for block %d: %s", lastSubmissionBlock, err.Error())
397+
return err
398+
}
398399
}
399400
}
400-
if hasSubmittedPastBlock || lastSubmissionBlock == 0 {
401+
if hasSubmittedPastBlock || lastSubmissionBlock == 0 || !eventFound {
401402
// If the node participated in consensus, find the next submission target
402403
var targetBlockHeader *types.Header
403404
_, nextSubmissionTime, targetBlockHeader, err = utils.FindNextSubmissionTarget(t.rp, eth2Config, t.bc, t.ec, lastSubmissionBlock, referenceTimestamp, submissionIntervalInSeconds)

0 commit comments

Comments
 (0)