Add `ChainMonitor::archive_fully_resolved_monitor_channels`
authorjbesraa <jbesraa@gmail.com>
Wed, 27 Mar 2024 16:19:14 +0000 (18:19 +0200)
committerMatt Corallo <git@bluematt.me>
Thu, 18 Apr 2024 17:12:07 +0000 (17:12 +0000)
commit4b5504366b2e0c7e29e8bf4bee5d05445f363c35
treefa672d5c0e3fdab4ed97718b1644d9acfde82aee
parent9a1649c2b2ca5b348d2e58624ccc936197bcb4d0
Add `ChainMonitor::archive_fully_resolved_monitor_channels`

  Archives fully resolved channel monitors by adding them to a backup
  location and removing them from the primary storage & the monitor set.

  This is useful for pruning fully resolved monitors from the monitor
  set and primary storage so they are not reloaded on every new new
  block connection.

  We also add a new function, `archive_persisted_channel` to the
  `Persist` trait that writes the monitor to an archive storage and
  removes it from the primary storage.
fuzz/src/utils/test_persister.rs
lightning/src/chain/chainmonitor.rs
lightning/src/ln/monitor_tests.rs
lightning/src/util/persist.rs
lightning/src/util/test_utils.rs