Skip to content

Commit 4a81c1f

Browse files
committed
f s/is_valid_for_initiator/is_for_initiator
1 parent 5c2bda7 commit 4a81c1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/interactivetxs.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ const MAX_RECEIVED_TX_ADD_OUTPUT_COUNT: u16 = 4096;
3939
const MAX_INPUTS_OUTPUTS_COUNT: usize = 252;
4040

4141
trait SerialIdExt {
42-
fn is_valid_for_initiator(&self) -> bool;
42+
fn is_for_initiator(&self) -> bool;
4343
}
4444

4545
impl SerialIdExt for SerialId {
46-
fn is_valid_for_initiator(&self) -> bool {
46+
fn is_for_initiator(&self) -> bool {
4747
self % 2 == 0
4848
}
4949
}
@@ -90,7 +90,7 @@ struct NegotiationContext {
9090
impl NegotiationContext {
9191
fn is_serial_id_valid_for_counterparty(&self, serial_id: &SerialId) -> bool {
9292
// 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()
9494
}
9595

9696
fn counterparty_inputs_contributed(
@@ -642,7 +642,7 @@ where
642642
let mut serial_id_bytes = [0u8; 8];
643643
serial_id_bytes.copy_from_slice(&rand_bytes[..8]);
644644
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 {
646646
serial_id ^= 1;
647647
}
648648
serial_id

0 commit comments

Comments
 (0)