Skip to main content

pair_giving_secrets

Function pair_giving_secrets 

Source
pub fn pair_giving_secrets(
    library: &mut Library,
    network: &Network,
    code: &PairingCode,
    showing: Showing<'_>,
    now: &dyn Fn() -> u64,
    rng: &mut impl CryptoRng,
) -> Result<Paired, NodeError>
Expand description

Pairs a new replica as pair does, and gives it the secrets, if it asks for them: the person chose to, and they are unlocked.

ยงErrors

Returns the errors of pair, and NodeError::SecretsLocked if the secrets are not unlocked, before the code is shown.