Skip to content

Commit 15c251f

Browse files
authored
Make filter initialization compile
I think `Box<dyn>` is maybe the simplest to understand for new Rust users. We could also use `Arc<dyn>` or simply `&dyn `.
1 parent a16a4af commit 15c251f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/build_node_rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ let filter = YourTxFilter();
209209
**Example:**
210210

211211
```rust
212-
let filter: Option<Filter> = // leave this as None or insert the Filter trait
213-
// object, depending on what you did for Step 5
212+
let filter: Option<Box<dyn Filter>> = // leave this as None or insert the Filter trait
213+
// object, depending on what you did for Step 5
214214

215215
let chain_monitor = ChainMonitor::new(
216216
filter, &broadcaster, &logger, &fee_estimator, &persister

0 commit comments

Comments
 (0)