public async Task <bool> Init(BlockData blockData) { Clear(); if (blockData == null) { return(false); } var latest = blockData.Block; var start = latest.BlockId - _maxBlockCount; for (var i = start; i <= latest.BlockId; i++) { blockData = await _blockStorage.GetBlockData(i); if (blockData != null) { if (!AddBlock(blockData)) { return(false); } } } return(true); }