Skip to content

Commit

Permalink
Merge pull request #145 from SiaFoundation/requeue-proof-item
Browse files Browse the repository at this point in the history
Requeue proof action item
  • Loading branch information
lukechampine authored Jul 19, 2022
2 parents ea79021 + ffb069e commit 3ad547d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/host/storageobligations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,20 @@ func (h *Host) threadedHandleActionItem(soid types.FileContractID) {
return
}

// Queue another action item to check the status of the storage proof.
// Additional action items should not be queued on or after the proof
// deadline to prevent removeStorageObligation from being called
// multiple times.
recheckHeight := blockHeight + resubmissionTimeout
if so.proofDeadline() > recheckHeight {
h.mu.Lock()
err := h.queueActionItem(recheckHeight, so.id())
h.mu.Unlock()
if err != nil {
h.log.Printf("contract %s action: Error queuing action item: %s", soid, err)
}
}

// Get the index of the segment for which to build the proof.
segmentIndex, err := h.cs.StorageProofSegment(so.id())
if err != nil {
Expand Down

0 comments on commit 3ad547d

Please sign in to comment.