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

[pallet_author_inherent] kick_off_authorship_validation benchmark fails #79

Open
Chralt98 opened this issue Oct 21, 2022 · 0 comments
Open

Comments

@Chralt98
Copy link

Chralt98 commented Oct 21, 2022

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);
      }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant