Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[r2r] Lightning channels and payments history #1240

Merged
merged 54 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
94feb06
WIP: Channels history in SQL storage
shamardy Mar 1, 2022
8fa6bde
review fixes: specific types, add serialization tests
shamardy Mar 3, 2022
16b80bc
WIP: refactor start_lightning fn
shamardy Mar 4, 2022
4f432a3
WIP: continue refactoring start_lightning fn
shamardy Mar 7, 2022
eb62785
WIP: refactoring, add init_channel_manager fn
shamardy Mar 7, 2022
88009fa
WIP: refactoring, ln_p2p
shamardy Mar 8, 2022
b13d64f
WIP: refactoring, ln_platform
shamardy Mar 9, 2022
1ff8f86
Refactor completed
shamardy Mar 9, 2022
ccd53a6
WIP: use user_channel_id as channel id in rpc calls to avoid using te…
shamardy Mar 11, 2022
628921e
Channels in sql WIP: add pending outbound channel to sql
shamardy Mar 14, 2022
35667fa
Channels sql WIP: get channel and add funding_tx
shamardy Mar 16, 2022
5069239
Channels sql WIP: add funding tx to sql after FundingGenerationReady …
shamardy Mar 16, 2022
15047e0
Channels sql WIP: add closure_reason to sql table
shamardy Mar 18, 2022
4378f7d
Channels sql WIP: update channel to closed in sql
shamardy Mar 18, 2022
fdc54f7
Channels sql WIP: get closed channels in list_channels response
shamardy Mar 18, 2022
4c6b479
Channels sql WIP: get closed channel by rpc_id in get_channel_details…
shamardy Mar 18, 2022
be882bf
Channels sql WIP: add closing transaction to sql
shamardy Mar 19, 2022
ab8dc45
outbound channels history in sql completed
shamardy Mar 21, 2022
5eb9306
Payments in sql WIP: add/get payment to/from sql
shamardy Mar 22, 2022
61c9493
Payments in sql completed
shamardy Mar 22, 2022
1e60810
Merge remote-tracking branch 'origin/dev' into channels-payments-history
shamardy Mar 23, 2022
9936e25
update rust-lightning to v0.0.105
shamardy Mar 23, 2022
7bd7b92
set manually_accept_inbound_channels to true to be able to add them t…
shamardy Mar 24, 2022
bf11e7a
correct calculation of claimed balances
shamardy Mar 25, 2022
25fc9e2
add destination to payment info
shamardy Mar 28, 2022
892e2b9
add description to payment info
shamardy Mar 28, 2022
316200a
add created/updated at to payment info, wip: list payments by filter
shamardy Mar 28, 2022
70bcc06
list_payments_by_filter completed, pagination completed
shamardy Mar 30, 2022
dc54493
list channels by filter for open and closed
shamardy Mar 31, 2022
3b8b3f3
Merge remote-tracking branch 'origin/dev' into channels-payments-history
shamardy Mar 31, 2022
6b2e98f
fix wasm build
shamardy Mar 31, 2022
27578e2
part of review fixes
shamardy Apr 1, 2022
e680cd3
part of review fixes: save_channel_closing_details function
shamardy Apr 4, 2022
395af28
review fixes wip: simplify find_watched_output_spend_with_header
shamardy Apr 4, 2022
6ba33af
Merge remote-tracking branch 'origin/dev' into channels-payments-history
shamardy Apr 4, 2022
4825601
review fixes
shamardy Apr 5, 2022
0b3691b
reviw fix for funding_generated_in_block
shamardy Apr 6, 2022
658c8b3
fix saving closing tx to db issues if electrums are down
shamardy Apr 7, 2022
79982e2
review fixes: better grouping of SqlStorage trait functions + added d…
shamardy Apr 8, 2022
6d717fc
review fixes: add get_open_channels_by_filter fn
shamardy Apr 8, 2022
152b2af
review fixes wip: some refactors
shamardy Apr 11, 2022
c5b4c90
review fixes wip: default_fee_per_kb, refactors
shamardy Apr 11, 2022
55d2ab6
review fixes: use try_loop_with_sleep macro wip
shamardy Apr 11, 2022
7026db7
review fixes
shamardy Apr 13, 2022
68a70b2
Merge remote-tracking branch 'origin/dev' into channels-payments-history
shamardy Apr 13, 2022
f1001a0
remove wasm warnings
shamardy Apr 13, 2022
1800112
destination can't be None in OutboundPayment
shamardy Apr 18, 2022
d9e6b6a
empty string for description instead of an option
shamardy Apr 18, 2022
6ccb32f
Review fixes: refactors
shamardy Apr 18, 2022
21a04d7
review fixes wip
shamardy Apr 19, 2022
9b3339a
wip: more review fixes
shamardy Apr 20, 2022
6d9df92
review fixes: inline, refactors
shamardy Apr 22, 2022
88c68ea
sql_text_conversion_err, h256_slice_from_row
shamardy Apr 26, 2022
b71a7e4
Merge remote-tracking branch 'origin/dev' into channels-payments-history
shamardy Apr 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions mm2src/coins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jsonrpc-core = "8.0.1"
keys = { path = "../mm2_bitcoin/keys" }
lazy_static = "1.4"
libc = "0.2"
lightning = "0.0.104"
lightning = "0.0.105"
lightning-background-processor = { path = "lightning_background_processor" }
lightning-invoice = "0.12.0"
lightning-invoice = "0.13.0"
metrics = "0.12"
mocktopus = "0.7.0"
num-traits = "0.2"
Expand Down Expand Up @@ -93,7 +93,7 @@ web-sys = { version = "0.3.55", features = ["console", "Headers", "Request", "Re
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
dirs = { version = "1" }
lightning-persister = { path = "lightning_persister" }
lightning-net-tokio = "0.0.104"
lightning-net-tokio = "0.0.105"
rust-ini = { version = "0.13" }
rustls = { version = "0.19", features = ["dangerous_configuration"] }
tokio = { version = "1.7" }
Expand Down
6 changes: 3 additions & 3 deletions mm2src/coins/eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use std::collections::HashMap;
use std::ops::Deref;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::atomic::{AtomicU64, Ordering as AtomicOrderding};
use std::sync::atomic::{AtomicU64, Ordering as AtomicOrdering};
use std::sync::{Arc, Mutex};
use web3::types::{Action as TraceAction, BlockId, BlockNumber, Bytes, CallRequest, FilterBuilder, Log, Trace,
TraceFilterBuilder, Transaction as Web3Transaction, TransactionId};
Expand Down Expand Up @@ -3100,13 +3100,13 @@ impl MmCoin for EthCoin {
})
}

fn required_confirmations(&self) -> u64 { self.required_confirmations.load(AtomicOrderding::Relaxed) }
fn required_confirmations(&self) -> u64 { self.required_confirmations.load(AtomicOrdering::Relaxed) }

fn requires_notarization(&self) -> bool { false }

fn set_required_confirmations(&self, confirmations: u64) {
self.required_confirmations
.store(confirmations, AtomicOrderding::Relaxed);
.store(confirmations, AtomicOrdering::Relaxed);
}

fn set_requires_notarization(&self, _requires_nota: bool) {
Expand Down
Loading