Validate

Validate

On each epoch, a subnet node is chosen at random to validate the epoch.

pub fn validate(
    origin: OriginFor<T>,
    subnet_id: u32,
    data: Vec<SubnetNodeData>
) -> DispatchResultWithPostInfo

Parameters

  • subnet_id: The key of the subnet.

  • data: The required data for submitting rewards consensus data.

    • peer_id: The peer_id for the peer in association to data being submitted.

    • score: The score of the peer in a subnet.

    pub struct SubnetNodeData {
        pub peer_id: PeerId,
        pub score: u64,
    }

Last updated