File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ const MAX_RECEIVED_TX_ADD_OUTPUT_COUNT: u16 = 4096;
39
39
const MAX_INPUTS_OUTPUTS_COUNT : usize = 252 ;
40
40
41
41
trait SerialIdExt {
42
- fn is_valid_for_initiator ( & self ) -> bool ;
42
+ fn is_for_initiator ( & self ) -> bool ;
43
43
}
44
44
45
45
impl SerialIdExt for SerialId {
46
- fn is_valid_for_initiator ( & self ) -> bool {
46
+ fn is_for_initiator ( & self ) -> bool {
47
47
self % 2 == 0
48
48
}
49
49
}
@@ -90,7 +90,7 @@ struct NegotiationContext {
90
90
impl NegotiationContext {
91
91
fn is_serial_id_valid_for_counterparty ( & self , serial_id : & SerialId ) -> bool {
92
92
// A received `SerialId`'s parity must match the role of the counterparty.
93
- self . holder_is_initiator == !serial_id. is_valid_for_initiator ( )
93
+ self . holder_is_initiator == !serial_id. is_for_initiator ( )
94
94
}
95
95
96
96
fn counterparty_inputs_contributed (
@@ -642,7 +642,7 @@ where
642
642
let mut serial_id_bytes = [ 0u8 ; 8 ] ;
643
643
serial_id_bytes. copy_from_slice ( & rand_bytes[ ..8 ] ) ;
644
644
let mut serial_id = u64:: from_be_bytes ( serial_id_bytes) ;
645
- if serial_id. is_valid_for_initiator ( ) != is_initiator {
645
+ if serial_id. is_for_initiator ( ) != is_initiator {
646
646
serial_id ^= 1 ;
647
647
}
648
648
serial_id
You can’t perform that action at this time.
0 commit comments