mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-16 13:00:19 +02:00
Introduce a fat OnionPeerActor that handles the full onion message processing pipeline for each peer connection. The actor decodes incoming onion messages, determines the routing action (forward or deliver), executes the action via PeerMessageSender, and dispatches updates to subscribers via OnionMessageUpdateDispatcher. Key components: - OnionRouter interface abstracting sphinx router operations - PeerMessageSender interface for forwarding to other peers - OnionMessageUpdateDispatcher interface for subscriber notifications - OnionActorFactory for spawning per-peer actors with shared deps - Full test suite calling Receive() directly with NoOpReplayLog
17 lines
490 B
Go
17 lines
490 B
Go
package onionmessage
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
// ErrActorShuttingDown is returned by the actor logic when its context
|
|
// is cancelled.
|
|
ErrActorShuttingDown = errors.New("actor shutting down")
|
|
|
|
// ErrNextNodeIdEmpty is returned when the next node ID is missing from
|
|
// the route data.
|
|
ErrNextNodeIdEmpty = errors.New("next node ID empty")
|
|
|
|
// ErrSCIDEmpty is returned when the short channel ID is missing from
|
|
// the route data.
|
|
ErrSCIDEmpty = errors.New("short channel ID empty")
|
|
)
|