(storage: Arc<Storage>)
| 32 | |
| 33 | impl BlockChain { |
| 34 | pub(crate) fn new(storage: Arc<Storage>) -> Result<Self> { |
| 35 | Ok(Self { |
| 36 | accounts: AccountStorage::new(storage), |
| 37 | blocks: vec![Block::genesis()?], |
| 38 | transactions: Arc::new(Mutex::new(TransactionStorage::new())), |
| 39 | world_state: WorldState::new(), |
| 40 | }) |
| 41 | } |
| 42 | |
| 43 | pub(crate) fn get_current_block(&self) -> Result<Block> { |
| 44 | let block = self |
nothing calls this directly
no outgoing calls
no test coverage detected