Skip to content

Commit de7139d

Browse files
committed
Fix fuzz failure
1 parent 477ddb5 commit de7139d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning-rapid-gossip-sync/src/processing.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub(crate) fn update_network_graph_from_byte_stream<R: Read>(
5454
let chain_hash: BlockHash = Readable::read(read_cursor)?;
5555
let latest_seen_timestamp: u32 = Readable::read(read_cursor)?;
5656
// backdate the applied timestamp by a week
57-
let backdated_timestamp = latest_seen_timestamp - 24 * 3600 * 7;
57+
let backdated_timestamp = latest_seen_timestamp.saturating_sub(24 * 3600 * 7);
5858

5959
let node_id_count: u32 = Readable::read(read_cursor)?;
6060
let mut node_ids: Vec<PublicKey> = Vec::with_capacity(std::cmp::min(

0 commit comments

Comments
 (0)