Skip to content

Commit abce308

Browse files
committed
f Update to LDK 0.0.114 and BDK 0.27.1
1 parent 8724438 commit abce308

File tree

8 files changed

+117
-118
lines changed

8 files changed

+117
-118
lines changed

Cargo.toml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ description = "A ready-to-go node implementation based on LDK."
99
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1010

1111
[dependencies]
12-
#lightning = { version = "0.0.112", features = ["max_level_trace", "std"] }
13-
#lightning-invoice = { version = "0.20" }
14-
#lightning-net-tokio = { version = "0.0.112" }
15-
#lightning-persister = { version = "0.0.112" }
16-
#lightning-background-processor = { version = "0.0.112" }
17-
#lightning-rapid-gossip-sync = { version = "0.0.112" }
12+
lightning = { version = "0.0.114", features = ["max_level_trace", "std"] }
13+
lightning-invoice = { version = "0.22" }
14+
lightning-net-tokio = { version = "0.0.114" }
15+
lightning-persister = { version = "0.0.114" }
16+
lightning-background-processor = { version = "0.0.114" }
17+
lightning-rapid-gossip-sync = { version = "0.0.114" }
18+
lightning-transaction-sync = { version = "0.0.114", features = ["esplora-async"] }
1819

1920
#lightning = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main", features = ["max_level_trace", "std"] }
2021
#lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main" }
@@ -24,13 +25,13 @@ description = "A ready-to-go node implementation based on LDK."
2425
#lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main" }
2526
#lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", branch="main", features = ["esplora-async"] }
2627

27-
lightning = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase", features = ["max_level_trace", "std"] }
28-
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
29-
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
30-
lightning-persister = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
31-
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
32-
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
33-
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase", features = ["esplora-async"] }
28+
#lightning = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase", features = ["max_level_trace", "std"] }
29+
#lightning-invoice = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
30+
#lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
31+
#lightning-persister = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
32+
#lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
33+
#lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase" }
34+
#lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", branch="2022-11-add-transaction-sync-crate-pre-rebase", features = ["esplora-async"] }
3435

3536
#lightning = { path = "../rust-lightning/lightning", features = ["max_level_trace", "std"] }
3637
#lightning-invoice = { path = "../rust-lightning/lightning-invoice" }
@@ -40,7 +41,7 @@ lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning",
4041
#lightning-rapid-gossip-sync = { path = "../rust-lightning/lightning-rapid-gossip-sync" }
4142
#lightning-transaction-sync = { path = "../rust-lightning/lightning-transaction-sync", features = ["esplora-async"] }
4243

43-
bdk = { version = "0.26.0", default-features = false, features = ["async-interface", "use-esplora-async", "key-value-db"]}
44+
bdk = { version = "0.27.1", default-features = false, features = ["async-interface", "use-esplora-async", "key-value-db"]}
4445
bitcoin = "0.29.2"
4546

4647
rand = "0.8.5"

src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub enum Error {
1717
InvoiceInvalid,
1818
/// Invoice creation failed.
1919
InvoiceCreationFailed,
20-
/// No route for the given target could be found.
21-
RoutingFailed,
20+
/// A attempted payment has failed.
21+
PaymentFailed,
2222
/// A given peer info could not be parsed.
2323
PeerInfoParseFailed,
2424
/// A channel could not be opened.
@@ -47,7 +47,7 @@ impl fmt::Display for Error {
4747
Self::NonUniquePaymentHash => write!(f, "An invoice must not get payed twice."),
4848
Self::InvoiceInvalid => write!(f, "The given invoice is invalid."),
4949
Self::InvoiceCreationFailed => write!(f, "Failed to create invoice."),
50-
Self::RoutingFailed => write!(f, "Failed to find route."),
50+
Self::PaymentFailed => write!(f, "Failed to send the given payment."),
5151
Self::PeerInfoParseFailed => write!(f, "Failed to parse the given peer information."),
5252
Self::ChannelCreationFailed => write!(f, "Failed to create channel."),
5353
Self::ChannelClosingFailed => write!(f, "Failed to close channel."),

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{
33
PaymentInfoStorage, PaymentStatus, Wallet,
44
};
55

6-
use crate::logger::{log_error, log_given_level, log_info, log_internal, Logger};
6+
use crate::logger::{log_error, log_info, Logger};
77

88
use lightning::chain::chaininterface::{BroadcasterInterface, ConfirmationTarget, FeeEstimator};
99
use lightning::ln::PaymentHash;

src/io_utils.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ pub(crate) fn read_network_graph(
4141
}
4242
}
4343

44-
let genesis_hash =
45-
bitcoin::blockdata::constants::genesis_block(config.network).header.block_hash();
46-
Ok(NetworkGraph::new(genesis_hash, logger))
44+
Ok(NetworkGraph::new(config.network, logger))
4745
}
4846

4947
pub(crate) fn read_scorer(

0 commit comments

Comments
 (0)