Skip to content

Commit

Permalink
Document return value
Browse files Browse the repository at this point in the history
  • Loading branch information
moshababo committed Jan 23, 2024
1 parent 930d3ea commit 500b17f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion node/actors/bft/src/leader/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ pub(crate) struct StateMachine {
}

impl StateMachine {
/// Creates a new StateMachine struct.
/// Creates a new [`StateMachine`] instance.
///
/// Returns a tuple containing:
/// * The newly created [`StateMachine`] instance.
/// * A sender handle that should be used to send values to be processed by the instance, asynchronously.
#[instrument(level = "trace")]
pub fn new(
ctx: &ctx::Ctx,
Expand Down
8 changes: 6 additions & 2 deletions node/actors/bft/src/replica/state_machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ pub(crate) struct StateMachine {
}

impl StateMachine {
/// Creates a new StateMachine struct. We try to recover a past state from the storage module,
/// otherwise we initialize the state machine with whatever head block we have.
/// Creates a new [`StateMachine`] instance, attempting to recover a past state from the storage module,
/// otherwise initializes the state machine with the current head block.
///
/// Returns a tuple containing:
/// * The newly created [`StateMachine`] instance.
/// * A sender handle that should be used to send values to be processed by the instance, asynchronously.
pub(crate) async fn start(
ctx: &ctx::Ctx,
config: Arc<Config>,
Expand Down

0 comments on commit 500b17f

Please sign in to comment.