Skip to content

Commit 09a91e0

Browse files
authored
Lightning batch transactions confirmations, spv (wip), refactors #1045 (#1339)
* remove ok_or_retry_after_sleep_sync! macro * process_txs_confirmations independent from update_best_block * use get_tx_height in get_confirmed_registered_txs to prepare for batch requests * validate_spv_proof refactor wip, spv for lightning wip * fix test_spv_proof * remove find_watched_output_spend_with_header * impl some features of rust-lightning v0.0.106 wip, import code from lightning-persister v0.0.106 and lightning-background-processor v0.0.106 wip * add inbound channels details to sql db * remove lightning-persister and lightning-background-processor crates from our codebase and use v0.0.106 crates instead * remove ok_or_continue macro, use join_all to check for transactions confirmations in batches * small fixes after testing * fix fmt * get confirmed transaction info from spv proof fn * move get_tx_if_onchain, get_tx_height to rpc_clients * spv proof refactoring wip * fix fmt * spv proof refactor * break ln_storage.rs to multiple files, break up persister struct into db struct and filesystem struct * fixes for persisting monitors to back up dir * fix clippy for windows * fix some todos * btc difficulty calculations for spv validation wip * continued: btc difficulty calculations for spv validation wip, added more test cases * continued: btc difficulty calculations for spv validation wip, work.rs, storage.rs * fix wasm, tests * spv difficulty testnet * fix some todos * fixes after merge * add events abort handlers * Review fixes wip * Review fixes wip, log db error in open_channel, workTestVectors.json * Review fixes, save claiming tx to db after successful broadcasting * Review fixes wip, use bool without casting, use i64 instead of u64 casting for db operations * Review fixes wip, #[cfg(target_family = "windows")], refactors * Review fixes, get tx height by block hash
1 parent ac57077 commit 09a91e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3699
-4544
lines changed

Cargo.lock

Lines changed: 13 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
[workspace]
22
members = [
33
"mm2src/coins",
4-
"mm2src/coins/lightning_persister",
5-
"mm2src/coins/lightning_background_processor",
64
"mm2src/coins/utxo_signer",
75
"mm2src/coins_activation",
86
"mm2src/common/shared_ref_counter",

mm2src/coins/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ keys = { path = "../mm2_bitcoin/keys" }
5050
lazy_static = "1.4"
5151
libc = "0.2"
5252
lightning = { git = "https://github.com/shamardy/rust-lightning", branch = "0.0.106" }
53-
lightning-background-processor = { path = "lightning_background_processor" }
5453
lightning-invoice = { git = "https://github.com/shamardy/rust-lightning", branch = "0.0.106" }
5554
metrics = "0.12"
5655
mm2_core = { path = "../mm2_core" }
@@ -99,7 +98,8 @@ web-sys = { version = "0.3.55", features = ["console", "Headers", "Request", "Re
9998

10099
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
101100
dirs = { version = "1" }
102-
lightning-persister = { path = "lightning_persister" }
101+
lightning-background-processor = { git = "https://github.com/shamardy/rust-lightning", branch = "0.0.106" }
102+
lightning-persister = { git = "https://github.com/shamardy/rust-lightning", branch = "0.0.106" }
103103
lightning-net-tokio = { git = "https://github.com/shamardy/rust-lightning", branch = "0.0.106" }
104104
rust-ini = { version = "0.13" }
105105
rustls = { version = "0.20", features = ["dangerous_configuration"] }

0 commit comments

Comments
 (0)