File tree 1 file changed +1
-25
lines changed
lightning-background-processor/src
1 file changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -624,30 +624,6 @@ mod tests {
624
624
}
625
625
}
626
626
627
- macro_rules! check_mutex_persisted_data {
628
- ( $node: expr, $filepath: expr) => {
629
- let mut expected_bytes = Vec :: new( ) ;
630
- loop {
631
- expected_bytes. clear( ) ;
632
- match $node. lock( ) . unwrap( ) . write( & mut expected_bytes) {
633
- Ok ( _) => {
634
- match std:: fs:: read( $filepath) {
635
- Ok ( bytes) => {
636
- if bytes == expected_bytes {
637
- break
638
- } else {
639
- continue
640
- }
641
- } ,
642
- Err ( _) => continue
643
- }
644
- } ,
645
- Err ( e) => panic!( "Unexpected error: {}" , e)
646
- }
647
- }
648
- }
649
- }
650
-
651
627
// Check that the initial channel manager data is persisted as expected.
652
628
let filepath = get_full_filepath ( "test_background_processor_persister_0" . to_string ( ) , "manager" . to_string ( ) ) ;
653
629
check_persisted_data ! ( nodes[ 0 ] . node, filepath. clone( ) ) ;
@@ -674,7 +650,7 @@ mod tests {
674
650
675
651
// Check scorer is persisted
676
652
let filepath = get_full_filepath ( "test_background_processor_persister_0" . to_string ( ) , "scorer" . to_string ( ) ) ;
677
- check_mutex_persisted_data ! ( scorer, filepath. clone( ) ) ;
653
+ check_persisted_data ! ( scorer. lock ( ) . unwrap ( ) , filepath. clone( ) ) ;
678
654
679
655
assert ! ( bg_processor. stop( ) . is_ok( ) ) ;
680
656
}
You can’t perform that action at this time.
0 commit comments