mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 18:58:01 +00:00
Avoid cloning and multiple entry calls (#2226)
This commit is contained in:
@@ -1000,9 +1000,7 @@ fn store_chunks(
|
||||
);
|
||||
}
|
||||
|
||||
for chunk in chunks {
|
||||
subsystem.chunks_cache.entry(*candidate_hash).or_default().insert(chunk.index, chunk.clone());
|
||||
|
||||
for chunk in &chunks {
|
||||
let pruning_record = ChunkPruningRecord {
|
||||
candidate_hash: candidate_hash.clone(),
|
||||
block_number,
|
||||
@@ -1024,6 +1022,8 @@ fn store_chunks(
|
||||
);
|
||||
}
|
||||
|
||||
subsystem.chunks_cache.entry(*candidate_hash).or_default().extend(chunks.into_iter().map(|c| (c.index, c)));
|
||||
|
||||
tx.put_vec(
|
||||
columns::META,
|
||||
&CHUNK_PRUNING_KEY,
|
||||
|
||||
Reference in New Issue
Block a user