projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad147a2
)
Fix HTLC exclusion balance calculation criteria
2018-07-send-initial
author
Matt Corallo
<git@bluematt.me>
Tue, 24 Jul 2018 19:01:56 +0000
(15:01 -0400)
committer
Matt Corallo
<git@bluematt.me>
Tue, 24 Jul 2018 19:11:38 +0000
(15:11 -0400)
src/ln/channel.rs
patch
|
blob
|
history
diff --git
a/src/ln/channel.rs
b/src/ln/channel.rs
index 5b5604838fc852cecba93454c65578db9c35ec13..76d6f43e217b23f99bcd9aa0f4861a51e9e5d309 100644
(file)
--- a/
src/ln/channel.rs
+++ b/
src/ln/channel.rs
@@
-660,8
+660,13
@@
impl Channel {
value_to_self_msat_offset -= htlc.amount_msat as i64;
}
},
+ HTLCState::RemoteRemoved => {
+ if !generated_by_local && htlc.fail_reason.is_none() {
+ value_to_self_msat_offset -= htlc.amount_msat as i64;
+ }
+ },
HTLCState::LocalRemoved => {
- if
!
generated_by_local && htlc.local_removed_fulfilled {
+ if generated_by_local && htlc.local_removed_fulfilled {
value_to_self_msat_offset += htlc.amount_msat as i64;
}
},