You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lightning-block-sync: Implement ser. logic for header Cache types
During syncing, `lightning-block-sync` populates as a block header
`Cache` that is crucial to be able to disconnected previously-connected
headers cleanly in case of a reorg. Moreover, the `Cache` can have
performance benefits as subsequently synced listeners might not
necessarily need to lookup all headers again from the chain source.
While this `Cache` is ~crucial to the clean operation of
`lightning-block-sync`, it was previously not possible to persist it to
disk due to an absence of serialization logic implementations for the
corresponding sub-types. Here, we do just that (Implement said
serialization logic) to allow users to persist the `Cache`.
Making use of the serialization logic for all the sub-types, we also
switch the `UnboundedCache` type to be a newtype wrapper around a
`HashMap` (rather than a straight typedef) and implement TLV-based
serialization logic on it.
0 commit comments