Skip to main content

ensure_accepted

Function ensure_accepted 

Source
pub fn ensure_accepted(chain_terms_hash: B256, accept_flag: bool) -> Result<()>
Expand description

Enforce operator-terms acceptance before registration signs registerNode.

chain_terms_hash is the network’s on-chain currentTermsHash; accept_flag is --accept-terms. Returns Ok(()) only when the operator has accepted the current terms; otherwise returns a descriptive error and registration must not proceed.

§Errors

  • Client stale (embedded terms ≠ on-chain terms).
  • No terminal and --accept-terms not passed.
  • The operator answered no at the interactive prompt.