Skip to main content

SyncAdvertisementsReport

Struct SyncAdvertisementsReport 

Source
pub struct SyncAdvertisementsReport {
    pub to_create: usize,
    pub to_revoke: usize,
    pub create_error: Option<String>,
    pub submit_error: Option<String>,
    pub admitted: BTreeMap<String, usize>,
    pub lookup_error: Option<String>,
    pub revoke_skipped: usize,
    pub revoke_error: Option<String>,
    pub revoke_submit_error: Option<String>,
}
Expand description

Outcome of one Engine::sync_advertisements run (bsv-low #320 defect 3a).

The engine used to swallow create/submit failures into error! and return Ok(()), so the admin route reported success while zero advertisements were admitted locally; a caller could not tell a converged no-op (to_create == 0) from a silent failure. Every field here is observational — the sync’s behavior is unchanged, its outcome is no longer hidden.

Fields§

§to_create: usize

Advertisements the diff found missing (attempted this run). A converged node reports 0 here.

§to_revoke: usize

Stale advertisements the diff said to revoke.

§create_error: Option<String>

advertiser.create_advertisements failure, verbatim.

§submit_error: Option<String>

Local Engine::submit failure for the created ads, verbatim — the path that silently hid the self-admission failure live (our own ls_ship/ls_slap never gained our ads, so every cycle re-created all of them).

§admitted: BTreeMap<String, usize>

Outputs admitted per topic by the local submit (from the STEAK). A successful submit that admitted NOTHING (topic-manager refusal) shows up here as explicit zeros.

§lookup_error: Option<String>

advertiser.find_all_advertisements failure, verbatim (#320 M2). When set, creation was REFUSED this run: a blind read must never become “current ads = none” and re-create (re-pay) the entire set.

§revoke_skipped: usize

Stale ads the diff wanted revoked but the advertiser declined to build a revocation for (the CF advertiser’s documented v1 no-op — #320 L2). Distinguishes “revoke happened” from “revoke skipped”.

§revoke_error: Option<String>

advertiser.revoke_advertisements failure, verbatim.

§revoke_submit_error: Option<String>

Local Engine::submit failure for the revocation, verbatim.

Implementations§

Source§

impl SyncAdvertisementsReport

Source

pub fn ok(&self) -> bool

True when nothing errored. NOTE: a submit that admitted zero outputs is not an error at this layer — that refusal is Self::effective’s job.

Source

pub fn admitted_total(&self) -> usize

Total outputs admitted by the local submit across topics.

Source

pub fn effective(&self) -> bool

True when the run errored nowhere AND the local submit admitted EVERY created ad (#320 M1 + delta D1): each advertisement is exactly one output and change is never a SHIP/SLAP token, so full admission means admitted_total() >= to_create (defensive >=). A weaker > 0 bar let a PARTIAL admit pass — the live set is 9 SHIP + 8 SLAP in ONE tx with independent per-topic admission, so tm_ship admitting its 9 while tm_slap refused all 8 read as success while the diff re-created (re-paid for) the refused 8 every cycle. Subsumes the converged no-op (0 >= 0).

Trait Implementations§

Source§

impl Clone for SyncAdvertisementsReport

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SyncAdvertisementsReport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SyncAdvertisementsReport

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Serialize for SyncAdvertisementsReport

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more