You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disallow taking two instances of the same mutex at the same time
Taking two instances of the same mutex may be totally fine, but it
requires a total lockorder that we cannot (trivially) check. Thus,
its generally unsafe to do if we can avoid it.
To discourage doing this, here we default to panicing on such locks
in our lockorder tests, with a separate lock function added that is
clearly labeled "unsafe" to allow doing so when we can guarantee a
total lockorder.
This requires adapting a number of sites to the new API, including
fixing a bug this turned up in `ChannelMonitor`'s `PartialEq` where
no lockorder was guaranteed.
let chain_mon = test_utils::TestChainMonitor::new(Some(&chain_source),&tx_broadcaster,&logger,&chanmon_cfgs[0].fee_estimator,&persister,&node_cfgs[0].keys_manager);
let watchtower = test_utils::TestChainMonitor::new(Some(&chain_source),&chanmon_cfgs[0].tx_broadcaster,&logger,&chanmon_cfgs[0].fee_estimator,&persister,&node_cfgs[0].keys_manager);
let watchtower = test_utils::TestChainMonitor::new(Some(&chain_source),&chanmon_cfgs[0].tx_broadcaster,&logger,&chanmon_cfgs[0].fee_estimator,&persister,&node_cfgs[0].keys_manager);
let watchtower = test_utils::TestChainMonitor::new(Some(&chain_source),&chanmon_cfgs[0].tx_broadcaster,&logger,&chanmon_cfgs[0].fee_estimator,&persister,&node_cfgs[0].keys_manager);
0 commit comments