ChannelCommandResult class

What PaymentChannelAggregate answers a command with (bead libspiffy-kl4i).

It used to answer success with a raw List<Event> and failure with a bare {'success': false, 'error': ..., 'commandId': ...} map, so a caller told success from failure by testing the runtime shape of the reply.

events is load-bearing, not diagnostic. The manager forwards the ChannelEvents to the external P2P broadcaster, and reads fields off specific events — the lock time of a ChannelRequestedEvent is taken from the journaled event because recomputing it locally would be wrong. So the reply carries them rather than collapsing to success/error.

An empty events on a success is a success (bead libspiffy-y8x3): the aggregate answers an idempotent repeat with no events because there is nothing new to journal.

Inheritance

Constructors

ChannelCommandResult({required String commandId, required List<Event> events, required bool success, String? error})
ChannelCommandResult.failed({required String commandId, required String error})
The aggregate refused or failed commandId.

Properties

commandId → String
The command answered, by its commandId.
final
correlationId → String
The correlation ID of the message.
no setter
error → String?
Why the request failed; null when success is true.
final
events → List<Event>
The events the command journaled; empty on failure, and empty on an idempotent repeat.
final
hashCode → int
The hash code for this object.
no setterinherited
metadata → Map<String, dynamic>
The metadata of the message.
no setter
payload → dynamic
The reply itself, so ask<ConcreteResponse>() completes with it.
no setterinherited
replyTo → ActorRef?
The actor to reply to.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sender → ActorRef?
finalinherited
success → bool
Whether the request this reply answers succeeded.
final
timestamp → DateTime
The timestamp of the message.
no setter

Methods

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

Operators

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