Timestamp: set_timestamp
sets DidUpdate
#11960
Conversation
There exists the `set_timestamp` in the Timestamp pallet for setting the current timestamp. The problem is that it doesn't set `DidUpdate`. This results in `on_finalize` panicking. There is no real reason why the function doesn't also set `DidUpdate`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just looking at the timestamp pallet; there is a lot of unsafe math in it 🙈
I will fix it in a new MR.
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Before we overflow u64, it will take some time :P |
Yea I just saw that it is an unsigned extrinsic anyway... There is actually a test failure that looks related in |
Yeah that is because of your changes :D I fix it :D |
* Timestamp: `set_timestamp` sets `DidUpdate` There exists the `set_timestamp` in the Timestamp pallet for setting the current timestamp. The problem is that it doesn't set `DidUpdate`. This results in `on_finalize` panicking. There is no real reason why the function doesn't also set `DidUpdate`. * Update frame/timestamp/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix Babe tests Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Timestamp: `set_timestamp` sets `DidUpdate` There exists the `set_timestamp` in the Timestamp pallet for setting the current timestamp. The problem is that it doesn't set `DidUpdate`. This results in `on_finalize` panicking. There is no real reason why the function doesn't also set `DidUpdate`. * Update frame/timestamp/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix Babe tests Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
There exists the
set_timestamp
in the Timestamp pallet for setting the current timestamp. Theproblem is that it doesn't set
DidUpdate
. This results inon_finalize
panicking. There is noreal reason why the function doesn't also set
DidUpdate
.Close: #11958