From 8670763611547604322fea9ccc821db5d46af1c5 Mon Sep 17 00:00:00 2001 From: Bohdan Khorolets Date: Wed, 9 Feb 2022 09:29:58 +0200 Subject: [PATCH] Fix to be ready that shard is missing when we retrieve `state_changes` --- chain/indexer/src/streamer/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chain/indexer/src/streamer/mod.rs b/chain/indexer/src/streamer/mod.rs index e0da53f1065..b10fcd1325f 100644 --- a/chain/indexer/src/streamer/mod.rs +++ b/chain/indexer/src/streamer/mod.rs @@ -87,9 +87,7 @@ async fn build_streamer_message( shard_id, chunk: None, receipt_execution_outcomes: vec![], - state_changes: state_changes - .remove(&shard_id) - .expect("StateChanges for given shard should be present"), + state_changes: state_changes.remove(&shard_id).unwrap_or_default(), }) .collect::>();