pub enum AnnounceOutcome {
Accepted(Head),
Rotated(Head),
RotationDeferred(Head),
Failed {
error: String,
first: bool,
},
}Expand description
The result of an announce. An announce never fails the app’s own work, but
until one lands the node answers a device that holds the head it remembers
with “nothing new” without calling the app, so devices do not see the change.
The helper does not retry: Collection::announce is one synchronous call,
and the app retries a Failed (or RotationDeferred) announce on its own
schedule (see the README’s “Announce”).
Variants§
Accepted(Head)
The node took the head.
Rotated(Head)
The node remembered a higher version in this epoch (the app’s database went back in time); the helper rotated the epoch and announced the new head.
RotationDeferred(Head)
The node answered rotate again to the head of a fresh epoch, which a
node that keeps its marks never does. The head stays; the next announce
asks again.
Failed
The announce failed. first is true for the first failure after a
success (or since start), so the app logs it once.