Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/net/downloaders/src/headers/reverse_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ where
.into())
}

let sealed_target = headers.remove(0).seal_slow();
let sealed_target = headers.swap_remove(0).seal_slow();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fine because we only need the first one and aren't using it anymore

let (header, seal) = sealed_target.into_parts();
let target = SealedHeader::new(header, seal);

Expand Down
2 changes: 1 addition & 1 deletion crates/payload/builder/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ where
let (fut, keep_alive) = self.payload_jobs[job].0.resolve();

if keep_alive == KeepPayloadJobAlive::No {
let (_, id) = self.payload_jobs.remove(job);
let (_, id) = self.payload_jobs.swap_remove(job);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also fine because we always find the index first and the ordering doesn't matter

trace!(%id, "terminated resolved job");
}

Expand Down