Function Channel.loadChannels

Load all known channels from the database and return it in a map.

static Channel[geod24.bitblob.BitBlob!(64L)] loadChannels (
  FlashConfig flash_conf,
  ManagedDatabase db,
  FlashAPI delegate(in ref PublicKey, core.time.Duration, Address) makeFlashClient,
  Engine engine,
  ITaskManager taskman,
  TransactionResult delegate(in ref Transaction) txPublisher,
  void delegate(in ref PublicKey, in ref geod24.bitblob.BitBlob!(64L), in ref geod24.bitblob.BitBlob!(64L), in Amount, in Height, in ref OnionPacket) paymentRouter,
  @safe void delegate(PublicKey, geod24.bitblob.BitBlob!(64L), ChannelState, ErrorCode, Height) onChannelNotify,
  @safe void delegate(PublicKey, geod24.bitblob.BitBlob!(64L), geod24.bitblob.BitBlob!(64L), ErrorCode) onPaymentComplete,
  void delegate(PublicKey, in geod24.bitblob.BitBlob!(64L)[], in geod24.bitblob.BitBlob!(64L)[]) onUpdateComplete,
  FeeUTXOs delegate(ulong) getFeeUTXOs
);

Parameters

NameDescription
flash_conf the global flash configuration
db the DB to load from
makeFlashClient delegate to make the FlashAPI client from
engine the execution engine
taskman used to spawn tasks
txPublisher used to publish transactions to the Agora network.
paymentRouter used to forward HTLCs to the next hop
onUpdateComplete called when a channel update has completed
getFeeUTXOs called to get UTXOs for on-chain fees

Returns

a map of any loaded channels