From: Jeffrey Czyz Date: Fri, 11 Mar 2022 20:26:02 +0000 (-0600) Subject: Merge pull request #1331 from TheBlueMatt/2022-02-no-copy-invoice-fields X-Git-Tag: v0.0.106~24 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ca163c3fae94e64b7f70a7a549cd761cfa7e52d2;p=rust-lightning Merge pull request #1331 from TheBlueMatt/2022-02-no-copy-invoice-fields Use &mut self in invoice updaters, not take-self-return-Self --- ca163c3fae94e64b7f70a7a549cd761cfa7e52d2 diff --cc lightning/src/routing/router.rs index 96eabf89b,740fd691e..62cbda9a7 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@@ -2484,11 -2367,10 +2484,12 @@@ mod tests let (_, our_id, privkeys, nodes) = get_nodes(&secp_ctx); let payment_params = PaymentParameters::from_node_id(nodes[2]); let scorer = test_utils::TestScorer::with_penalty(0); + let keys_manager = test_utils::TestKeysInterface::new(&[0u8; 32], Network::Testnet); + let random_seed_bytes = keys_manager.get_secure_random_bytes(); // Disable nodes 1, 2, and 8 by requiring unknown feature bits - let unknown_features = NodeFeatures::known().set_unknown_feature_required(); + let mut unknown_features = NodeFeatures::known(); + unknown_features.set_unknown_feature_required(); add_or_update_node(&net_graph_msg_handler, &secp_ctx, &privkeys[0], unknown_features.clone(), 1); add_or_update_node(&net_graph_msg_handler, &secp_ctx, &privkeys[1], unknown_features.clone(), 1); add_or_update_node(&net_graph_msg_handler, &secp_ctx, &privkeys[7], unknown_features.clone(), 1);