mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
Timestamp: set_timestamp sets DidUpdate (#11960)
* 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>
This commit is contained in:
@@ -429,7 +429,7 @@ pub fn generate_equivocation_proof(
|
||||
System::reset_events();
|
||||
System::initialize(¤t_block, &parent_hash, &pre_digest);
|
||||
System::set_block_number(current_block);
|
||||
Timestamp::set_timestamp(current_block);
|
||||
Timestamp::set_timestamp(*current_slot * Babe::slot_duration());
|
||||
System::finalize()
|
||||
};
|
||||
|
||||
|
||||
@@ -659,7 +659,7 @@ fn report_equivocation_invalid_equivocation_proof() {
|
||||
equivocation_proof.second_header = equivocation_proof.first_header.clone();
|
||||
assert_invalid_equivocation(equivocation_proof);
|
||||
|
||||
// missing preruntime digest from one header
|
||||
// missing pre-runtime digest from one header
|
||||
let mut equivocation_proof = generate_equivocation_proof(
|
||||
offending_validator_index as u32,
|
||||
&offending_authority_pair,
|
||||
|
||||
Reference in New Issue
Block a user