Interface BlockRetrievalOptions<ProgressEvents>

interface BlockRetrievalOptions<ProgressEvents> {
    onProgress?: ((evt) => void);
    signal?: AbortSignal;
    validateFn?(block): Promise<void>;
}

Type Parameters

Hierarchy

Properties

Methods

Properties

onProgress?: ((evt) => void)

Type declaration

signal?: AbortSignal

Methods

  • A function that blockBrokers should call prior to returning a block to ensure it can maintain control of the block request flow. e.g. TrustedGatewayBlockBroker will use this to ensure that the block is valid from one of the gateways before assuming its work is done. If the block is not valid, it should try another gateway and WILL consider the gateway that returned the invalid blocks completely unreliable.

    Parameters

    Returns Promise<void>