Skip to content

Commit a14ae8a

Browse files
committed
Rework GraduatedRebalancer to work across restarts
Previously, we would await payment successes before doing a rebalance successful event. This would cause issues if the app was closed during a rebalance. This adds handling so the GraduatedRebalancer is now event based and persists its state. We also now have better handling for failed rebalances to go along with it.
1 parent e648fe7 commit a14ae8a

16 files changed

Lines changed: 671 additions & 294 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ panic = 'abort' # Abort on panic
1919
bitcoin-payment-instructions = { version = "0.6.0" }
2020
lightning = { version = "0.2.0" }
2121
lightning-invoice = { version = "0.34.0" }
22+
lightning-macros = "0.2.0"
2223

2324
[profile.release]
2425
panic = "abort"

graduated-rebalancer/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ license = "MIT OR Apache-2.0"
1010
bitcoin-payment-instructions = { workspace = true }
1111
lightning = { workspace = true }
1212
lightning-invoice = { workspace = true }
13-
tokio = { version = "1", default-features = false }
13+
lightning-macros = { workspace = true }
14+
tokio = { version = "1", default-features = false, features = ["sync"] }

0 commit comments

Comments
 (0)