diff --git a/Libplanet.Extensions.Cocona/Commands/StoreCommand.cs b/Libplanet.Extensions.Cocona/Commands/StoreCommand.cs index 550d98aea9..4223f1059d 100644 --- a/Libplanet.Extensions.Cocona/Commands/StoreCommand.cs +++ b/Libplanet.Extensions.Cocona/Commands/StoreCommand.cs @@ -162,8 +162,7 @@ private static IEnumerable> IterateBlocks(IStore store, TxId txId) { foreach (var blockHash in store.IterateTxIdBlockHashIndex(txId)) { - var block = GetBlock(store, blockHash); - yield return block; + yield return GetBlock(store, blockHash); } } @@ -186,7 +185,7 @@ private static IEnumerable BuildTxIdBlockHashIndex(IStore store, int offset } var index = offset; - foreach (var blockHash in store.IterateIndexes(chainId, offset, limit)) + foreach (BlockHash blockHash in store.IterateIndexes(chainId, offset, limit)) { yield return index++; if (!(store.GetBlockDigest(blockHash) is { } blockDigest)) @@ -195,8 +194,7 @@ private static IEnumerable BuildTxIdBlockHashIndex(IStore store, int offset $"Block is missing for BlockHash: {blockHash} index: {index}."); } - foreach (var txId in blockDigest.TxIds.Select(bytes => new TxId(bytes.ToArray())) - .ToImmutableArray()) + foreach (TxId txId in blockDigest.TxIds.Select(bytes => new TxId(bytes.ToArray()))) { store.PutTxIdBlockHashIndex(txId, blockHash); }