]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix unused `Secp256k1` context in monitor_tests
authorMatt Corallo <git@bluematt.me>
Sun, 23 Apr 2023 16:54:53 +0000 (16:54 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 24 Apr 2023 17:58:06 +0000 (17:58 +0000)
lightning/src/ln/monitor_tests.rs

index b3f8277166d8f9d4bc0a64167014e49672a4c08e..b20a2e57526b6f3a50596477a5097496172f57a9 100644 (file)
@@ -1784,7 +1784,6 @@ fn do_test_monitor_rebroadcast_pending_claims(anchors: bool) {
        if anchors {
                assert!(cfg!(anchors));
        }
-       let secp = Secp256k1::new();
        let mut chanmon_cfgs = create_chanmon_cfgs(2);
        let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
        let mut config = test_default_channel_config();
@@ -1838,6 +1837,7 @@ fn do_test_monitor_rebroadcast_pending_claims(anchors: bool) {
                                feerate = if let Event::BumpTransaction(BumpTransactionEvent::HTLCResolution {
                                        target_feerate_sat_per_1000_weight, mut htlc_descriptors, tx_lock_time,
                                }) = events.pop().unwrap() {
+                                       let secp = Secp256k1::new();
                                        assert_eq!(htlc_descriptors.len(), 1);
                                        let descriptor = htlc_descriptors.pop().unwrap();
                                        assert_eq!(descriptor.commitment_txid, commitment_txn[0].txid());