BlockHeadersStoredEvent class

Block headers were stored: how many, and the heights they span.

This is how an application follows the header chain. The initial CDN download reports its own progress through LibSpiffyActorSystem.initialize(onHeaderSyncProgress:), which gives the headers downloaded, the total, and the phase; every batch of headers stored after that — a peer's answer to header sync, or a StoreHeadersCommand — is this event. Whether the chain has caught up with its peers is HeaderSyncStatusEvent.

A batch whose headers were all known already stores nothing and is not announced. success is false when a header of the batch was rejected; error says why the first one was.

Inheritance

Constructors

BlockHeadersStoredEvent({required int headersStored, required int startHeight, required int endHeight, required bool success, String? error, String source = peerSource, String? requestId})

Properties

endHeight → int
final
error → String?
final
eventTimestamp → DateTime
When the event was made.
finalinherited
failure → String?
Why the request failed, or null when it succeeded. WalletCoordinator.ask throws a CoordinatorFailure carrying this reply when it is not null.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
headersStored → int
final
requestId → String?
The CoordinatorRequest.requestId of the request this answers; null when no request caused it.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
source → String
Where the headers came from: peerSource for header sync from peers, otherwise the StoreHeadersCommand's source.
final
startHeight → int
Height of the first and the last header stored; 0 when none was.
final
success → bool
final
walletId → String?
Optional wallet ID for filtering events by wallet
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

peerSource → const String
source of headers a peer sent.