Skip to content

Commit a34db65

Browse files
authored
Update build_a_node_in_rust.md
1 parent c7f7fd4 commit a34db65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorials/build_a_node_in_rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ let scorer = Arc::new(Mutex::new(ProbabilisticScorer::new(params, Arc::clone(&ne
716716
**What it's used for:** to create an invoice payer that retries failed payment paths.
717717

718718
```rust
719-
let router = DefaultRouter::new(Arc::clone(&network_graph), &logger, keys_manager.get_secure_random_bytes());
719+
let router = DefaultRouter::new(Arc::clone(&network_graph), &logger, keys_manager.get_secure_random_bytes(), Arc::clone(&scorer));
720720

721721
let invoice_payer = InvoicePayer::new(
722722
Arc::clone(&channel_manager),
@@ -729,7 +729,7 @@ let invoice_payer = InvoicePayer::new(
729729

730730
**Implementation notes:** The scorer is used when finding a route and when handling events from successful and failed paths. The retrier consumes those events by telling the scorer that a path has failed or succeeded and then retries by querying for a (potentially new) path with the updated scorer.
731731

732-
**Dependencies** `ChannelManager`, `DefaultRouter`, `Logger`, `Event`, `RetryAttempts`
732+
**Dependencies** `ChannelManager`, `DefaultRouter`, `ProbablisticScorer`, `Logger`, `Event`, `RetryAttempts`
733733

734734
**Reference** [`InvoicePayer` docs](https://docs.rs/lightning-invoice/*/lightning_invoice/payment/struct.InvoicePayer.html), [LDK sample node InvoicePayer example](https://github.com/lightningdevkit/ldk-sample/blob/6f6473bf1bb4a1b2149a9a5c3616c39653dec144/src/main.rs#L615-L622)
735735

0 commit comments

Comments
 (0)