Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 8503d86

Browse files
authored
Merge pull request #74 from tnull/2023-12-upgrade-to-LDK-0.0.119
Upgrade LDK to 0.0.119 and rust-bitcoin to 0.30.2
2 parents 739751b + f48ecbf commit 8503d86

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ std = ["lightning/std", "bitcoin/std"]
1313
no-std = ["hashbrown", "lightning/no-std", "bitcoin/no-std", "core2/alloc"]
1414

1515
[dependencies]
16-
lightning = { version = "0.0.118", default-features = false, features = ["max_level_trace"] }
17-
lightning-invoice = "0.26.0"
18-
bitcoin = { version = "0.29.0", default-features = false }
16+
lightning = { version = "0.0.119", default-features = false, features = ["max_level_trace"] }
17+
lightning-invoice = "0.27.0"
18+
bitcoin = { version = "0.30.2", default-features = false }
1919
hashbrown = { version = "0.8", optional = true }
2020
core2 = { version = "0.3.0", optional = true, default-features = false }
2121

rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ hard_tabs = true # use tab characters for indentation, spaces for alignment
22
use_field_init_shorthand = true
33
max_width = 100
44
use_small_heuristics = "Max"
5-
fn_args_layout = "Compressed"
5+
fn_params_layout = "Compressed"

src/lsps2/msgs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl RawOpeningFeeParams {
6969
hmac.input(self.valid_until.to_rfc3339().as_bytes());
7070
hmac.input(&self.min_lifetime.to_be_bytes());
7171
hmac.input(&self.max_client_to_self_delay.to_be_bytes());
72-
let promise_bytes = Hmac::from_engine(hmac).into_inner();
72+
let promise_bytes = Hmac::from_engine(hmac).to_byte_array();
7373
let promise = utils::hex_str(&promise_bytes[..]);
7474
OpeningFeeParams {
7575
min_fee_msat: self.min_fee_msat,

src/lsps2/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn is_valid_opening_fee_params(
3737
hmac.input(fee_params.valid_until.to_rfc3339().as_bytes());
3838
hmac.input(&fee_params.min_lifetime.to_be_bytes());
3939
hmac.input(&fee_params.max_client_to_self_delay.to_be_bytes());
40-
let promise_bytes = Hmac::from_engine(hmac).into_inner();
40+
let promise_bytes = Hmac::from_engine(hmac).to_byte_array();
4141
let promise = utils::hex_str(&promise_bytes[..]);
4242
promise == fee_params.promise
4343
}

src/manager.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ where
471471
C::Target: Filter,
472472
{
473473
fn filtered_block_connected(
474-
&self, header: &bitcoin::BlockHeader, txdata: &chain::transaction::TransactionData,
474+
&self, header: &bitcoin::block::Header, txdata: &chain::transaction::TransactionData,
475475
height: u32,
476476
) {
477477
if let Some(best_block) = &self.best_block {
@@ -486,7 +486,7 @@ where
486486
self.best_block_updated(header, height);
487487
}
488488

489-
fn block_disconnected(&self, header: &bitcoin::BlockHeader, height: u32) {
489+
fn block_disconnected(&self, header: &bitcoin::block::Header, height: u32) {
490490
let new_height = height - 1;
491491
if let Some(best_block) = &self.best_block {
492492
let mut best_block = best_block.write().unwrap();
@@ -510,7 +510,7 @@ where
510510
C::Target: Filter,
511511
{
512512
fn transactions_confirmed(
513-
&self, header: &bitcoin::BlockHeader, txdata: &chain::transaction::TransactionData,
513+
&self, header: &bitcoin::block::Header, txdata: &chain::transaction::TransactionData,
514514
height: u32,
515515
) {
516516
// TODO: Call transactions_confirmed on all sub-modules that require it, e.g., LSPS1MessageHandler.
@@ -522,11 +522,11 @@ where
522522
// confirmed at a height <= the one we now unconfirmed.
523523
}
524524

525-
fn best_block_updated(&self, header: &bitcoin::BlockHeader, height: u32) {
525+
fn best_block_updated(&self, header: &bitcoin::block::Header, height: u32) {
526526
// TODO: Call best_block_updated on all sub-modules that require it, e.g., LSPS1MessageHandler.
527527
}
528528

529-
fn get_relevant_txids(&self) -> Vec<(bitcoin::Txid, Option<bitcoin::BlockHash>)> {
529+
fn get_relevant_txids(&self) -> Vec<(bitcoin::Txid, u32, Option<bitcoin::BlockHash>)> {
530530
// TODO: Collect relevant txids from all sub-modules that, e.g., LSPS1MessageHandler.
531531
Vec::new()
532532
}

0 commit comments

Comments
 (0)