Skip to content

Commit 358d2d2

Browse files
committed
use rust-lightning v0.2
1 parent 9df8701 commit 358d2d2

12 files changed

Lines changed: 366 additions & 202 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ clap = "4.5.20"
2424
dirs = "5.0.1"
2525
futures = "0.3"
2626
hex = { package = "hex-conservative", version = "0.3.0", default-features = false }
27-
lightning = { version = "0.0.125", features = ["max_level_trace"], path = "./rust-lightning/lightning" }
28-
lightning-background-processor = { version = "0.0.125", features = ["futures"], path = "./rust-lightning/lightning-background-processor" }
29-
lightning-block-sync = { version = "0.0.125", features = ["rpc-client", "tokio"] }
30-
lightning-invoice = { version = "0.32.0", features = ["std"], path = "./rust-lightning/lightning-invoice" }
31-
lightning-net-tokio = { version = "0.0.125" }
32-
lightning-persister = { version = "0.0.125", path = "./rust-lightning/lightning-persister" }
33-
lightning-rapid-gossip-sync = { version = "0.0.125", path = "./rust-lightning/lightning-rapid-gossip-sync" }
27+
lightning = { version = "0.2.0", path = "./rust-lightning/lightning", features = ["dnssec"] }
28+
lightning-background-processor = { version = "0.2.0", path = "./rust-lightning/lightning-background-processor" }
29+
lightning-block-sync = { version = "0.2.0", features = ["rpc-client", "tokio"] }
30+
lightning-dns-resolver = { version = "0.3.0", path = "./rust-lightning/lightning-dns-resolver" }
31+
lightning-invoice = { version = "0.34.0", features = ["std"], path = "./rust-lightning/lightning-invoice" }
32+
lightning-macros = { version = "0.2.0" }
33+
lightning-net-tokio = { version = "0.2.0" }
34+
lightning-persister = { version = "0.2.0", path = "./rust-lightning/lightning-persister", features = ["tokio"] }
35+
lightning-rapid-gossip-sync = { version = "0.2.0", path = "./rust-lightning/lightning-rapid-gossip-sync" }
3436
magic-crypt = "4.0.1"
3537
rand = "0.8.5"
3638
regex = { version = "1.11", default-features = false }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ responsibility for loss of funds or any other issue you may encounter.
2222

2323
Also note that [rust-lightning] has been changed in order to support RGB
2424
channels,
25-
[here](https://github.com/RGB-Tools/rust-lightning/compare/v0.0.125...rgb)
26-
a comparison with `v0.0.125`, the version we applied the changes to.
25+
[here](https://github.com/RGB-Tools/rust-lightning/compare/v0.2...rgb)
26+
a comparison with `v0.2`, the version we applied the changes to.
2727

2828
## Install
2929

rust-lightning

Submodule rust-lightning updated 295 files

src/bitcoind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl BitcoindClient {
127127
rpc_user.clone(),
128128
rpc_password.clone()
129129
));
130-
let bitcoind_rpc_client = RpcClient::new(&rpc_credentials, http_endpoint)?;
130+
let bitcoind_rpc_client = RpcClient::new(&rpc_credentials, http_endpoint);
131131
let _dummy = bitcoind_rpc_client
132132
.call_method::<BlockchainInfo>("getblockchaininfo", &[])
133133
.await

src/disk.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use bitcoin::secp256k1::PublicKey;
22
use bitcoin::Network;
33
use chrono::Utc;
44
use lightning::routing::scoring::{ProbabilisticScorer, ProbabilisticScoringDecayParameters};
5+
use lightning::util::hash_tables::new_hash_map;
56
use lightning::util::logger::{Logger, Record};
67
use lightning::util::ser::{Readable, ReadableArgs, Writer};
78
use std::collections::HashMap;
@@ -162,7 +163,7 @@ pub(crate) fn read_inbound_payment_info(path: &Path) -> InboundPaymentInfoStorag
162163
}
163164
}
164165
InboundPaymentInfoStorage {
165-
payments: HashMap::new(),
166+
payments: new_hash_map(),
166167
}
167168
}
168169

@@ -173,7 +174,7 @@ pub(crate) fn read_outbound_payment_info(path: &Path) -> OutboundPaymentInfoStor
173174
}
174175
}
175176
OutboundPaymentInfoStorage {
176-
payments: HashMap::new(),
177+
payments: new_hash_map(),
177178
}
178179
}
179180

@@ -183,7 +184,7 @@ pub(crate) fn read_output_spender_txes(path: &Path) -> OutputSpenderTxes {
183184
return info;
184185
}
185186
}
186-
HashMap::new()
187+
new_hash_map()
187188
}
188189

189190
pub(crate) fn read_swaps_info(path: &Path) -> SwapMap {
@@ -193,7 +194,7 @@ pub(crate) fn read_swaps_info(path: &Path) -> SwapMap {
193194
}
194195
}
195196
SwapMap {
196-
swaps: HashMap::new(),
197+
swaps: new_hash_map(),
197198
}
198199
}
199200

@@ -219,6 +220,6 @@ pub(crate) fn read_channel_ids_info(path: &Path) -> ChannelIdsMap {
219220
}
220221
}
221222
ChannelIdsMap {
222-
channel_ids: HashMap::new(),
223+
channel_ids: new_hash_map(),
223224
}
224225
}

0 commit comments

Comments
 (0)