Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .github/workflows/semver.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: SemVer checks
on: [push, pull_request]
# Alby: disabled as this fork intentionally extends the upstream API, so semver checks
# against the upstream crates.io release always fail. Can still be run manually.
on: workflow_dispatch

jobs:
semver-checks:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: CI Checks - Swift Tests

on: [push, pull_request]
# Alby: disabled as we only compile for Alby Hub, not mobile. Can still be run manually.
on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

24 changes: 19 additions & 5 deletions src/io/vss_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ mod tests {
use vss_client::headers::FixedHeaders;

use super::*;
use crate::io::test_utils::do_read_write_remove_list_persist;
use crate::io::test_utils::{do_read_write_remove_list_persist, InMemoryStore};

#[test]
fn vss_read_write_remove_list_persist() {
Expand All @@ -940,8 +940,15 @@ mod tests {
let mut vss_seed = [0u8; 32];
rng.fill_bytes(&mut vss_seed);
let header_provider = Arc::new(FixedHeaders::new(HashMap::new()));
let vss_store =
VssStore::new(vss_base_url, rand_store_id, vss_seed, header_provider).unwrap();
let secondary_kv_store: Arc<crate::types::DynStore> = Arc::new(InMemoryStore::new());
let vss_store = VssStore::new(
vss_base_url,
rand_store_id,
vss_seed,
header_provider,
secondary_kv_store,
)
.unwrap();
do_read_write_remove_list_persist(&vss_store);
}

Expand All @@ -953,8 +960,15 @@ mod tests {
let mut vss_seed = [0u8; 32];
rng.fill_bytes(&mut vss_seed);
let header_provider = Arc::new(FixedHeaders::new(HashMap::new()));
let vss_store =
VssStore::new(vss_base_url, rand_store_id, vss_seed, header_provider).unwrap();
let secondary_kv_store: Arc<crate::types::DynStore> = Arc::new(InMemoryStore::new());
let vss_store = VssStore::new(
vss_base_url,
rand_store_id,
vss_seed,
header_provider,
secondary_kv_store,
)
.unwrap();

do_read_write_remove_list_persist(&vss_store);
drop(vss_store)
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ use gossip::GossipSource;
use graph::NetworkGraph;
pub use io::utils::generate_entropy_mnemonic;
// Alby: export LSPS2 opening fee computation for local fee estimation in Hub.
pub use liquidity::lsps2_compute_opening_fee_msat;
use io::utils::write_node_metrics;
use lightning::chain::BestBlock;
use lightning::events::bump_transaction::{Input, Wallet as LdkWallet};
Expand All @@ -146,6 +145,7 @@ use lightning::ln::msgs::SocketAddress;
use lightning::routing::gossip::NodeAlias;
use lightning::util::persist::KVStoreSync;
use lightning_background_processor::process_events_async;
pub use liquidity::lsps2_compute_opening_fee_msat;
use liquidity::{LSPS1Liquidity, LSPS2Liquidity, LiquiditySource};
use logger::{log_debug, log_error, log_info, log_trace, LdkLogger, Logger};
use payment::asynchronous::om_mailbox::OnionMessageMailbox;
Expand Down
11 changes: 4 additions & 7 deletions src/liquidity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,10 +1573,8 @@ pub struct LSPS2Liquidity {

impl LSPS2Liquidity {
pub(crate) fn new(
runtime: Arc<Runtime>,
connection_manager: Arc<ConnectionManager<Arc<Logger>>>,
liquidity_source: Option<Arc<LiquiditySource<Arc<Logger>>>>,
logger: Arc<Logger>,
runtime: Arc<Runtime>, connection_manager: Arc<ConnectionManager<Arc<Logger>>>,
liquidity_source: Option<Arc<LiquiditySource<Arc<Logger>>>>, logger: Arc<Logger>,
) -> Self {
Self { runtime, connection_manager, liquidity_source, logger }
}
Expand Down Expand Up @@ -1606,9 +1604,8 @@ impl LSPS2Liquidity {
log_info!(self.logger, "Connected to LSPS2 LSP {}@{}. ", lsp_node_id, lsp_address);

let liquidity_source = Arc::clone(&liquidity_source);
self.runtime.block_on(async move {
liquidity_source.lsps2_request_opening_fee_params().await
})
self.runtime
.block_on(async move { liquidity_source.lsps2_request_opening_fee_params().await })
}
}

Expand Down
3 changes: 2 additions & 1 deletion tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1136,9 +1136,10 @@ pub(crate) async fn do_channel_full_cycle<E: ElectrumApi>(
node_a.list_payments_with_filter(|p| matches!(p.kind, PaymentKind::Bolt11 { .. })).len(),
5
);
// Alby: +2 for the min_cltv_expiry_delta invoices created above
assert_eq!(
node_b.list_payments_with_filter(|p| matches!(p.kind, PaymentKind::Bolt11 { .. })).len(),
6
8
);
assert_eq!(
node_a
Expand Down
Loading