Skip to content

Commit

Permalink
More allow missing state update
Browse files Browse the repository at this point in the history
  • Loading branch information
mooori committed Feb 21, 2025
1 parent a8bffa5 commit e4581bc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions chain/client/src/chunk_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,12 @@ impl ChunkProducer {
chain_validate,
);
if let Ok(Some(ref mut produced_chunk)) = result {
let chunk_hash = produced_chunk.chunk.chunk_hash().0;
println!("putting state_update into cache for {chunk_hash}");
let state_update = produced_chunk
.state_update
.take()
.expect("chunk production must generate state_update");
self.runtime_adapter.cache_cp_state_update(chunk_hash, state_update);
let state_update = produced_chunk.state_update.take();
if let Some(state_update) = state_update {
let chunk_hash = produced_chunk.chunk.chunk_hash().0;
println!("putting state_update into cache for {chunk_hash}");
self.runtime_adapter.cache_cp_state_update(chunk_hash, state_update);
}
}
result
}
Expand Down

0 comments on commit e4581bc

Please # to comment.