You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/services/network-fabric.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,6 +308,19 @@ replay finality notifications for every historical transaction, while the caller
308
308
no way to tell a transient RPC failure from a genuinely fresh chain. Block 0 is used only
309
309
when no ledger is configured at all.
310
310
311
+
The returned error is classifiable with `errors.Is`, so a caller does not have to match on
312
+
its message:
313
+
314
+
| Sentinel | Meaning | Reaction |
315
+
| --- | --- | --- |
316
+
|`finality.ErrLedgerHeightUnavailable`| the height could not be read within the attempt budget, so no scan started | block-delivery finality is degraded; fall back to query-based finality and retry later |
317
+
|`finality.ErrNoLedgerInfo`| the ledger returned neither info nor an error — a driver contract violation | will not self-heal; report as a bug |
318
+
|`context.Canceled` / `context.DeadlineExceeded`| the context ended the retries | shutdown, not a failure |
319
+
320
+
`ErrNoLedgerInfo` is always accompanied by `ErrLedgerHeightUnavailable`, and the underlying
321
+
ledger error is preserved in every case. An error matching none of these comes from the
322
+
block scan itself rather than from resolving the starting block.
323
+
311
324
### Notification Mode
312
325
313
326
Uses asynchronous event notifications from the FSC layer:
return0, errors.Wrapf(ctx.Err(), "cancelled while getting ledger info, last error [%v]", lastErr)
138
+
return0, errors.Wrap(errors.Join(ctx.Err(), lastErr), "cancelled while getting ledger info")
114
139
case<-time.After(delay):
115
140
}
116
141
delay*=2
117
142
}
118
143
119
-
return0, errors.Wrapf(lastErr, "failed to get ledger info after %d attempt(s), refusing to rescan from genesis", attempts)
144
+
return0, errors.Wrapf(errors.Join(ErrLedgerHeightUnavailable, lastErr), "failed to get ledger info after %d attempt(s), refusing to rescan from genesis", attempts)
0 commit comments