cargo fmt

This commit is contained in:
Luke Parker 2023-04-23 18:56:48 -04:00
parent 05b1fc5f05
commit aa0ec4ac41
No known key found for this signature in database

View file

@ -144,7 +144,13 @@ impl<D: Db, T: Transaction, P: P2p> Tributary<D, T, P> {
self.network.blockchain.read().unwrap().block(hash)
}
pub fn time_of_block(&self, hash: &[u8; 32]) -> Option<u64> {
self.network.blockchain.read().unwrap().commit(hash).map(|commit| Commit::<Validators>::decode(&mut commit.as_ref()).unwrap().end_time)
self
.network
.blockchain
.read()
.unwrap()
.commit(hash)
.map(|commit| Commit::<Validators>::decode(&mut commit.as_ref()).unwrap().end_time)
}
pub fn commit(&self, hash: &[u8; 32]) -> Option<Vec<u8>> {
self.network.blockchain.read().unwrap().commit(hash)