avoid clone during local keys extraction
Signed-off-by: Uncle Stinky <uncle.stinky@ghostchain.io>
This commit is contained in:
parent
c25c3edd30
commit
52a1aa0fab
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -4114,7 +4114,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "ghost-weaver"
|
||||
version = "0.0.23"
|
||||
version = "0.0.24"
|
||||
dependencies = [
|
||||
"frame-benchmarking",
|
||||
"frame-support",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ghost-weaver"
|
||||
version = "0.0.23"
|
||||
version = "0.0.24"
|
||||
description = "Weaving a secure cryptographic tapestry across different external chains."
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
|
||||
@ -742,7 +742,7 @@ impl<T: Config> Pallet<T> {
|
||||
|
||||
let lock_period_key = Self::create_storage_key(b"network-period", &network_id_encoded);
|
||||
let lock_period = Self::read_offchain_storage(&lock_period_key, &MIN_LOCK_GUARD_PERIOD);
|
||||
let lock_until = rt_offchain::Duration::from_millis(lock_period);
|
||||
let lock_until = rt_offchain::Duration::from_millis(lock_period.max(MIN_LOCK_GUARD_PERIOD));
|
||||
|
||||
let network_lock_key = Self::create_storage_key(b"network-lock-", &network_id_encoded);
|
||||
let mut network_lock = StorageLock::<Time>::with_deadline(&network_lock_key, lock_until);
|
||||
@ -1114,12 +1114,7 @@ impl<T: Config> Pallet<T> {
|
||||
local_authorities
|
||||
.binary_search(&authority)
|
||||
.ok()
|
||||
.map(|location| {
|
||||
(
|
||||
index.unique_saturated_into(),
|
||||
local_authorities[location].clone(),
|
||||
)
|
||||
})
|
||||
.map(|_| (index as AuthIndex, authority))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user