Skip to content

Commit

Permalink
Merge branch 'pj/prune-err' into pj/pruning-gouging-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Dec 13, 2023
2 parents 41ed281 + c759ae4 commit 4a4a9c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autopilot/contract_pruning.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
var (
errConnectionRefused = errors.New("connection refused")
errConnectionTimedOut = errors.New("connection timed out")
errConnectionResetByPeer = errors.New("connection reset by peer")
errInvalidHandshakeSignature = errors.New("host's handshake signature was invalid")
errInvalidMerkleProof = errors.New("host supplied invalid Merkle proof")
errNoRouteToHost = errors.New("no route to host")
Expand Down Expand Up @@ -65,8 +66,10 @@ func (pr pruneResult) toAlert() (id types.Hash256, alert *alerts.Alert) {
id = alertIDForContract(alertPruningID, pr.fcid)

if shouldTrigger := pr.err != nil && !((isErr(pr.err, errInvalidMerkleProof) && build.VersionCmp(pr.version, "1.6.0") < 0) ||
isErr(pr.err, api.ErrContractNotFound) || // contract got archived
isErr(pr.err, errConnectionRefused) ||
isErr(pr.err, errConnectionTimedOut) ||
isErr(pr.err, errConnectionResetByPeer) ||
isErr(pr.err, errInvalidHandshakeSignature) ||
isErr(pr.err, errNoRouteToHost) ||
isErr(pr.err, errNoSuchHost)); shouldTrigger {
Expand Down

0 comments on commit 4a4a9c9

Please sign in to comment.