Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

[pallet_author_inherent] kick_off_authorship_validation benchmark fails #79

@Chralt98

Description

@Chralt98

It fails here. The T::SlotBeacon::slot() seems to return zero, although it was set in the benchmarks here.

set_block_number has an empty default implementation here.
So I assume the problem here is, that set_block_number was not properly implemented on the moonbeam nimbus side.

This is useful in case the block number provider is different than System

So the fix is to implement set_block_number for BlockNumberProvider:

impl BlockNumberProvider {
      type BlockNumber = u32;

      fn current_block_number() -> Self {
	      frame_system::Pallet<Config>::block_number()
      }

      #[cfg(features = "runtime-benchmarks")]
      fn set_block_number(slot: u32) -> Self {
	      frame_system::Pallet<Config>::set_block_number(slot);
      }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions