]> git.bitcoin.ninja Git - rust-lightning/commitdiff
panic if locktime is violated when broadcasting in tests 2021-05-broadcast-locktime-delay
authorMatt Corallo <git@bluematt.me>
Wed, 26 May 2021 20:02:30 +0000 (20:02 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 28 May 2021 23:58:07 +0000 (23:58 +0000)
lightning/src/util/test_utils.rs

index 7b9b54fabc2c79f1bff95f44c43ba678b034232d..60aafd9169a600c8ee19414c8b41f3a19db144b9 100644 (file)
@@ -210,7 +210,7 @@ impl chaininterface::BroadcasterInterface for TestBroadcaster {
                if tx.lock_time > self.blocks.lock().unwrap().len() as u32 + 1 && tx.lock_time < 500_000_000 {
                        for inp in tx.input.iter() {
                                if inp.sequence != 0xffffffff {
-                                       return;
+                                       panic!("We should never broadcast a transaction before its locktime ({})!", tx.lock_time);
                                }
                        }
                }