mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
add Copy to Moment type (#3476)
* add Copy to Moment type * bump version * add Copy to support::Traits::Time::Moment and removed few clones
This commit is contained in:
committed by
Bastian Köcher
parent
672e62fe0f
commit
da03850eed
@@ -258,7 +258,7 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
fn on_timestamp_set(now: T::Moment, slot_duration: T::Moment) {
|
||||
let last = Self::last();
|
||||
<Self as Store>::LastTimestamp::put(now.clone());
|
||||
<Self as Store>::LastTimestamp::put(now);
|
||||
|
||||
if last.is_zero() {
|
||||
return;
|
||||
@@ -266,7 +266,7 @@ impl<T: Trait> Module<T> {
|
||||
|
||||
assert!(!slot_duration.is_zero(), "Aura slot duration cannot be zero.");
|
||||
|
||||
let last_slot = last / slot_duration.clone();
|
||||
let last_slot = last / slot_duration;
|
||||
let cur_slot = now / slot_duration;
|
||||
|
||||
assert!(last_slot < cur_slot, "Only one block may be authored per slot.");
|
||||
|
||||
Reference in New Issue
Block a user