clementine_core::rpc::aggregator

Function nonce_aggregator

Source
async fn nonce_aggregator(
    nonce_streams: Vec<impl Stream<Item = Result<PublicNonce, BridgeError>> + Unpin + Send + 'static>,
    sighash_stream: impl Stream<Item = Result<(TapSighash, SignatureInfo), BridgeError>> + Unpin + Send + 'static,
    agg_nonce_sender: Sender<AggNonceQueueItem>,
) -> Result<(AggregatedNonce, AggregatedNonce), BridgeError>
Expand description

For each expected sighash, we collect a batch of public nonces from all verifiers. We aggregate and send to the agg_nonce_sender. Then repeat for the next sighash.