(&self)
| 1006 | } |
| 1007 | |
| 1008 | fn commit_initial_state(&self) -> BaseProofsStorageResult<BlockNumHash> { |
| 1009 | let mut inner = self.inner.write(); |
| 1010 | if let Some((number, hash)) = inner.anchor_block { |
| 1011 | inner.earliest_block = Some((number, hash)); |
| 1012 | Ok(BlockNumHash::new(number, hash)) |
| 1013 | } else { |
| 1014 | Err(BaseProofsStorageError::NoBlocksFound) |
| 1015 | } |
| 1016 | } |
| 1017 | } |
| 1018 | |
| 1019 | #[cfg(test)] |