mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Associated type Hasher for QueryPreimage, StorePreimage and Bounded (#1720)
I hope it's enough to fix #1701 the only solution I found to make it happen is to put an associated type to the `Bounded` enum as well. @liamaharon @kianenigma @bkchr Polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp --------- Signed-off-by: muraca <mmuraca247@gmail.com> Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -82,13 +82,13 @@ fn make_task<T: Config>(
|
||||
Scheduled { maybe_id, priority, call, maybe_periodic, origin, _phantom: PhantomData }
|
||||
}
|
||||
|
||||
fn bounded<T: Config>(len: u32) -> Option<Bounded<<T as Config>::RuntimeCall>> {
|
||||
fn bounded<T: Config>(len: u32) -> Option<BoundedCallOf<T>> {
|
||||
let call =
|
||||
<<T as Config>::RuntimeCall>::from(SystemCall::remark { remark: vec![0; len as usize] });
|
||||
T::Preimages::bound(call).ok()
|
||||
}
|
||||
|
||||
fn make_call<T: Config>(maybe_lookup_len: Option<u32>) -> Bounded<<T as Config>::RuntimeCall> {
|
||||
fn make_call<T: Config>(maybe_lookup_len: Option<u32>) -> BoundedCallOf<T> {
|
||||
let bound = BoundedInline::bound() as u32;
|
||||
let mut len = match maybe_lookup_len {
|
||||
Some(len) => len.min(T::Preimages::MAX_LENGTH as u32 - 2).max(bound) - 3,
|
||||
|
||||
Reference in New Issue
Block a user