From c759ae4dcff373cf654ba6dae937d0d863606691 Mon Sep 17 00:00:00 2001 From: PJ Date: Tue, 12 Dec 2023 17:45:41 +0100 Subject: [PATCH] autopilot: adjust pruning alert --- autopilot/contract_pruning.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autopilot/contract_pruning.go b/autopilot/contract_pruning.go index c1326d1d5..56ff3dd9c 100644 --- a/autopilot/contract_pruning.go +++ b/autopilot/contract_pruning.go @@ -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") @@ -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 {