File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -4070,7 +4070,10 @@ mod tests {
4070
4070
fn test_prune_preimages ( ) {
4071
4071
let secp_ctx = Secp256k1 :: new ( ) ;
4072
4072
let logger = Arc :: new ( TestLogger :: new ( ) ) ;
4073
- let broadcaster = Arc :: new ( TestBroadcaster { txn_broadcasted : Mutex :: new ( Vec :: new ( ) ) , blocks : Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) } ) ;
4073
+ let broadcaster = Arc :: new ( TestBroadcaster {
4074
+ txn_broadcasted : Mutex :: new ( Vec :: new ( ) ) ,
4075
+ blocks : Arc :: new ( Mutex :: new ( Vec :: new ( ) ) )
4076
+ } ) ;
4074
4077
let fee_estimator = TestFeeEstimator { sat_per_kw : Mutex :: new ( 253 ) } ;
4075
4078
4076
4079
let dummy_key = PublicKey :: from_secret_key ( & secp_ctx, & SecretKey :: from_slice ( & [ 42 ; 32 ] ) . unwrap ( ) ) ;
Original file line number Diff line number Diff line change @@ -107,12 +107,13 @@ impl LockMetadata {
107
107
108
108
#[ cfg( feature = "backtrace" ) ]
109
109
{
110
- let lock_constr_location = get_construction_location ( & res. _lock_construction_bt ) ;
110
+ let ( lock_constr_location, lock_constr_colno) =
111
+ get_construction_location ( & res. _lock_construction_bt ) ;
111
112
LOCKS_INIT . call_once ( || { unsafe { LOCKS = Some ( StdMutex :: new ( HashMap :: new ( ) ) ) ; } } ) ;
112
113
let mut locks = unsafe { LOCKS . as_ref ( ) } . unwrap ( ) . lock ( ) . unwrap ( ) ;
113
- match locks. entry ( lock_constr_location. 0 ) {
114
+ match locks. entry ( lock_constr_location) {
114
115
hash_map:: Entry :: Occupied ( e) => {
115
- assert_eq ! ( lock_constr_location . 1 ,
116
+ assert_eq ! ( lock_constr_colno ,
116
117
get_construction_location( & e. get( ) . _lock_construction_bt) . 1 ,
117
118
"Because Windows doesn't support column number results in backtraces, we cannot construct two mutexes on the same line or we risk lockorder detection false positives." ) ;
118
119
return Arc :: clone ( e. get ( ) )
You can’t perform that action at this time.
0 commit comments