File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,13 @@ async fn on_new_state<'a, A: Adapter + 'static>(
64
64
return Ok ( on_error ( & iface, & new_state, InvalidNewState :: RootHash ) . await ) ;
65
65
}
66
66
67
- let adapter = iface. adapter . read ( ) . await ;
67
+ let adapter = iface. adapter . read ( ) . await . clone ( ) ;
68
68
69
69
if !adapter. verify (
70
70
& iface. channel . spec . validators . leader ( ) . id ,
71
71
& proposed_state_root,
72
72
& new_state. signature ,
73
73
) ? {
74
- drop ( adapter) ;
75
74
return Ok ( on_error ( & iface, & new_state, InvalidNewState :: Signature ) . await ) ;
76
75
}
77
76
@@ -82,7 +81,6 @@ async fn on_new_state<'a, A: Adapter + 'static>(
82
81
. map_or ( Default :: default ( ) , |new_state| new_state. msg . balances ) ;
83
82
84
83
if !is_valid_transition ( & iface. channel , & prev_balances, & proposed_balances) {
85
- drop ( adapter) ;
86
84
return Ok ( on_error ( & iface, & new_state, InvalidNewState :: Transition ) . await ) ;
87
85
}
88
86
@@ -95,8 +93,6 @@ async fn on_new_state<'a, A: Adapter + 'static>(
95
93
& health_threshold,
96
94
) ;
97
95
98
- drop ( adapter) ;
99
-
100
96
iface
101
97
. propagate ( & [ & MessageTypes :: ApproveState ( ApproveState {
102
98
state_root : proposed_state_root,
You can’t perform that action at this time.
0 commit comments