Add docstrings to finalized_head

This commit is contained in:
Paul Hauner 2019-02-01 17:07:59 +11:00
parent b99e4ed9f4
commit a71e1031ce
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6

View File

@ -7,6 +7,7 @@ where
T: ClientDB, T: ClientDB,
U: SlotClock, U: SlotClock,
{ {
/// Update the justified head to some new values.
pub fn update_finalized_head( pub fn update_finalized_head(
&self, &self,
new_beacon_block: BeaconBlock, new_beacon_block: BeaconBlock,
@ -23,6 +24,8 @@ where
); );
} }
/// Returns a read-lock guarded `CheckPoint` struct for reading the justified head (as chosen,
/// indirectly, by the fork-choice rule).
pub fn finalized_head(&self) -> RwLockReadGuard<CheckPoint> { pub fn finalized_head(&self) -> RwLockReadGuard<CheckPoint> {
self.finalized_head.read() self.finalized_head.read()
} }