projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0ebf70d
)
Add comment noting that ChannelMonitor events are serialized
2020-02-events-in-monitors
author
Matt Corallo
<git@bluematt.me>
Fri, 28 Feb 2020 19:35:34 +0000
(14:35 -0500)
committer
Matt Corallo
<git@bluematt.me>
Fri, 28 Feb 2020 19:36:02 +0000
(14:36 -0500)
lightning/src/ln/channelmonitor.rs
patch
|
blob
|
history
diff --git
a/lightning/src/ln/channelmonitor.rs
b/lightning/src/ln/channelmonitor.rs
index f0b5fef0a0f955fa3bfaf58c056a283d89b1f6f5..1bc8c76b49e82765f73e550c41e17c3243a027fc 100644
(file)
--- a/
lightning/src/ln/channelmonitor.rs
+++ b/
lightning/src/ln/channelmonitor.rs
@@
-783,6
+783,11
@@
impl<R: ::std::io::Read> Readable<R> for ChannelMonitorUpdateStep {
///
/// You MUST ensure that no ChannelMonitors for a given channel anywhere contain out-of-date
/// information and are actively monitoring the chain.
///
/// You MUST ensure that no ChannelMonitors for a given channel anywhere contain out-of-date
/// information and are actively monitoring the chain.
+///
+/// Pending Events or updated HTLCs which have not yet been read out by
+/// get_and_clear_pending_htlcs_updated or get_and_clear_pending_events are serialized to disk and
+/// reloaded at deserialize-time. Thus, you must ensure that, when handling events, all events
+/// gotten are fully handled before re-serializing the new state.
pub struct ChannelMonitor<ChanSigner: ChannelKeys> {
latest_update_id: u64,
commitment_transaction_number_obscure_factor: u64,
pub struct ChannelMonitor<ChanSigner: ChannelKeys> {
latest_update_id: u64,
commitment_transaction_number_obscure_factor: u64,