pub fn answer(
closed: &Closed,
network: &Network,
timeout: Option<Duration>,
now: &dyn Fn() -> u64,
rng: &mut impl CryptoRng,
) -> Result<Option<Answered>, NodeError>Expand description
Waits up to timeout, or for as long as it takes, for another replica to sync, and
answers it, on a network that takes connections: the library is opened for the sync
and closed after it, so that other programs can use it in between. A replica that
connects while another program has the library open is told to try again later. After a
sync, the keys of the spaces are settled, as Library::settle_keys says, and then the
checkouts, as Library::settle_checkouts says. None if none came in time.
ยงErrors
Returns an error if the network fails; a sync that fails is in its result.