Skip to content

Commit 4dd9c9b

Browse files
authored
chore: make clippy happy (paradigmxyz#3291)
1 parent b1c77b3 commit 4dd9c9b

File tree

4 files changed

+17
-20
lines changed

4 files changed

+17
-20
lines changed

crates/consensus/beacon/src/engine/mod.rs

+8-10
Original file line numberDiff line numberDiff line change
@@ -758,21 +758,19 @@ where
758758
head: Header,
759759
state: ForkchoiceState,
760760
) -> OnForkChoiceUpdated {
761-
// 7. Client software MUST ensure that payloadAttributes.timestamp is
762-
// greater than timestamp of a block referenced by
763-
// forkchoiceState.headBlockHash. If this condition isn't held client
764-
// software MUST respond with -38003: `Invalid payload attributes` and
765-
// MUST NOT begin a payload build process. In such an event, the
766-
// forkchoiceState update MUST NOT be rolled back.
761+
// 7. Client software MUST ensure that payloadAttributes.timestamp is greater than timestamp
762+
// of a block referenced by forkchoiceState.headBlockHash. If this condition isn't held
763+
// client software MUST respond with -38003: `Invalid payload attributes` and MUST NOT
764+
// begin a payload build process. In such an event, the forkchoiceState update MUST NOT
765+
// be rolled back.
767766
if attrs.timestamp <= head.timestamp.into() {
768767
return OnForkChoiceUpdated::invalid_payload_attributes()
769768
}
770769

771770
// 8. Client software MUST begin a payload build process building on top of
772-
// forkchoiceState.headBlockHash and identified via buildProcessId value
773-
// if payloadAttributes is not null and the forkchoice state has been
774-
// updated successfully. The build process is specified in the Payload
775-
// building section.
771+
// forkchoiceState.headBlockHash and identified via buildProcessId value if
772+
// payloadAttributes is not null and the forkchoice state has been updated successfully.
773+
// The build process is specified in the Payload building section.
776774
let attributes = PayloadBuilderAttributes::new(state.head_block_hash, attrs);
777775

778776
// send the payload to the builder and return the receiver for the pending payload id,

crates/net/downloaders/src/bodies/bodies.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ where
8888
/// This method is going to return the batch as soon as one of the conditions below
8989
/// is fulfilled:
9090
/// 1. The number of non-empty headers in the batch equals requested.
91-
/// 2. The total number of headers in the batch (both empty and non-empty)
92-
/// is greater than or equal to the stream batch size.
91+
/// 2. The total number of headers in the batch (both empty and non-empty) is greater than
92+
/// or equal to the stream batch size.
9393
/// 3. Downloader reached the end of the range
9494
///
9595
/// NOTE: The batches returned have a variable length.

crates/stages/src/stages/sender_recovery.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,10 @@ mod tests {
368368

369369
/// # Panics
370370
///
371-
/// 1. If there are any entries in the [tables::TxSenders] table above
372-
/// a given block number.
371+
/// 1. If there are any entries in the [tables::TxSenders] table above a given block number.
373372
///
374-
/// 2. If the is no requested block entry in the bodies table,
375-
/// but [tables::TxSenders] is not empty.
373+
/// 2. If the is no requested block entry in the bodies table, but [tables::TxSenders] is
374+
/// not empty.
376375
fn ensure_no_senders_by_block(&self, block: BlockNumber) -> Result<(), TestRunnerError> {
377376
let body_result = self.tx.inner_rw().block_body_indices(block);
378377
match body_result {

crates/stages/src/stages/tx_lookup.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,11 @@ mod tests {
327327

328328
/// # Panics
329329
///
330-
/// 1. If there are any entries in the [tables::TxHashNumber] table above
331-
/// a given block number.
330+
/// 1. If there are any entries in the [tables::TxHashNumber] table above a given block
331+
/// number.
332332
///
333-
/// 2. If the is no requested block entry in the bodies table,
334-
/// but [tables::TxHashNumber] is not empty.
333+
/// 2. If the is no requested block entry in the bodies table, but [tables::TxHashNumber] is
334+
/// not empty.
335335
fn ensure_no_hash_by_block(&self, number: BlockNumber) -> Result<(), TestRunnerError> {
336336
let body_result = self.tx.inner_rw().block_body_indices(number);
337337
match body_result {

0 commit comments

Comments
 (0)