chore(provider): remove unnecessary collect in changeset readers (#22742)

Signed-off-by: Delweng <delweng@gmail.com>
This commit is contained in:
Delweng
2026-03-05 02:51:28 +08:00
committed by GitHub
parent fc4d88bf99
commit ae6edbd333

View File

@@ -1413,8 +1413,7 @@ impl<N: ProviderNodeTypes> StorageChangeSetReader for ConsistentProvider<N> {
if let Some(head_block) = &self.head_block {
database_end = head_block.anchor().number;
let chain = head_block.chain().collect::<Vec<_>>();
for state in chain {
for state in head_block.chain() {
let block_changesets = state
.block_ref()
.execution_output
@@ -1593,8 +1592,7 @@ impl<N: ProviderNodeTypes> ChangeSetReader for ConsistentProvider<N> {
// the anchor is the end of the db range
database_end = head_block.anchor().number;
let chain = head_block.chain().collect::<Vec<_>>();
for state in chain {
for state in head_block.chain() {
// found block in memory, collect its changesets
let block_changesets = state
.block_ref()