rust-lightning/lightning/src/ln
Matt Corallo 6090d9e6a8 Test if a given mutex is locked by the current thread in tests
In anticipation of the next commit(s) adding threaded tests, we
need to ensure our lockorder checks work fine with multiple
threads. Sadly, currently we have tests in the form
`assert!(mutex.try_lock().is_ok())` to assert that a given mutex is
not locked by the caller to a function.

The fix is rather simple given we already track mutexes locked by a
thread in our `debug_sync` logic - simply replace the check with a
new extension trait which (for test builds) checks the locked state
by only looking at what was locked by the current thread.
2023-02-16 21:35:23 +00:00
..
chan_utils.rs Cache NodeId by converting their_node_id to tuple 2023-02-08 11:56:58 -06:00
chanmon_update_fail_tests.rs Don't clone the Vec in remove_first_msg_event_to_node 2023-02-14 15:03:32 +01:00
channel.rs Swap PublicKey for NodeId in UnsignedChannelAnnouncement 2023-02-07 10:51:54 -06:00
channelmanager.rs Test if a given mutex is locked by the current thread in tests 2023-02-16 21:35:23 +00:00
features.rs Support negotiating anchors throughout channel open 2023-01-18 14:46:13 -08:00
functional_test_utils.rs Merge pull request #1966 from ViktorTigerstrom/2023-01-store-channels-per-peer-followups 2023-02-14 18:44:35 +00:00
functional_tests.rs Don't clone the Vec in remove_first_msg_event_to_node 2023-02-14 15:03:32 +01:00
inbound_payment.rs Add new payment type and metadata bytes 2023-01-24 21:01:27 +02:00
mod.rs Move PendingOutboundPayment to new outbound_payment module 2022-12-19 14:09:59 -05:00
monitor_tests.rs Add test yielding anchor-related events 2023-01-18 14:46:16 -08:00
msgs.rs Allow RoutingMessageHandler to signal backpressure 2023-02-09 15:40:43 +00:00
onion_route_tests.rs Move the final CLTV delta to PaymentParameters from RouteParams 2023-02-01 17:50:24 +00:00
onion_utils.rs Merge pull request #1895 from TheBlueMatt/2022-12-fix-missing-data 2022-12-06 22:46:04 +00:00
outbound_payment.rs Spontaneous payments: make preimage construction more concise 2023-02-03 10:44:31 -05:00
payment_tests.rs Don't clone the Vec in remove_first_msg_event_to_node 2023-02-14 15:03:32 +01:00
peer_channel_encryptor.rs Use NodeSigner::ecdh to compute SharedSecrets 2023-01-18 17:23:23 -08:00
peer_handler.rs Merge pull request #1980 from TheBlueMatt/2023-01-async-utxo-lookups 2023-02-10 19:57:11 -08:00
priv_short_conf_tests.rs Add the ability to broadcast gossip msgs via the event pipeline 2023-02-08 23:54:30 +00:00
reload_tests.rs Merge pull request #1966 from ViktorTigerstrom/2023-01-store-channels-per-peer-followups 2023-02-14 18:44:35 +00:00
reorg_tests.rs Don't serialize nodes which we have no channels to 2023-02-14 15:04:30 +01:00
script.rs Use UserConfig to determine advertised InitFeatures by ChannelManager 2023-01-13 23:54:51 -08:00
shutdown_tests.rs Move the final CLTV delta to PaymentParameters from RouteParams 2023-02-01 17:50:24 +00:00
wire.rs Bump workspace to rust edition 2018 2022-10-21 14:47:34 -07:00