]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Merge pull request #1331 from TheBlueMatt/2022-02-no-copy-invoice-fields
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 11 Mar 2022 20:26:02 +0000 (14:26 -0600)
committerGitHub <noreply@github.com>
Fri, 11 Mar 2022 20:26:02 +0000 (14:26 -0600)
Use &mut self in invoice updaters, not take-self-return-Self

1  2 
lightning-invoice/src/lib.rs
lightning/src/routing/router.rs

Simple merge
index 96eabf89bbf570d5d0bae7d9299c064648487880,740fd691e75c85e41f1f3ae06c5a1e18f41c82fa..62cbda9a76ddd097710d897537e11f104c1ec408
@@@ -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);