pallet-staking: era duration is off by one block. #468
Open
Description
In pallet-staking end_era
is called through pallet-session::end_session
during on_initialize
. But end_era
compute the duration of the era using the timestamp of the block, which is the timestamp of previous block due to timestamp inherent not being set yet for the current block. This means that the duration of the era is off doesn't take into account the duration of the last block of the era.
This should be fixed by computing the payout of the era in on_finalize
when timestamp is set.
Metadata
Assignees
Type
Projects
Status
📕 Backlog