From eb9025b51e261bb61630e1ee361572045245828e Mon Sep 17 00:00:00 2001 From: Nikolai Golub Date: Mon, 14 Aug 2023 14:20:48 +0200 Subject: [PATCH] Optimize generics declaration --- examples/demo-stf/src/runtime.rs | 7 +++++-- module-system/sov-modules-stf-template/src/app_template.rs | 6 ++++-- module-system/sov-modules-stf-template/src/lib.rs | 7 +++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/examples/demo-stf/src/runtime.rs b/examples/demo-stf/src/runtime.rs index 4314942d02..fa156883b3 100644 --- a/examples/demo-stf/src/runtime.rs +++ b/examples/demo-stf/src/runtime.rs @@ -107,7 +107,10 @@ impl SlotHooks for Runtime { } } -impl - sov_modules_stf_template::Runtime for Runtime +impl sov_modules_stf_template::Runtime for Runtime +where + C: Context, + Cond: ValidityCondition, + B: BlobReaderTrait, { } diff --git a/module-system/sov-modules-stf-template/src/app_template.rs b/module-system/sov-modules-stf-template/src/app_template.rs index 91ebe7f630..f11a9be2a9 100644 --- a/module-system/sov-modules-stf-template/src/app_template.rs +++ b/module-system/sov-modules-stf-template/src/app_template.rs @@ -69,9 +69,11 @@ impl From> for BatchReceipt, B: BlobReaderTrait> - AppTemplate +impl AppTemplate where + C: Context, + Cond: ValidityCondition, + B: BlobReaderTrait, RT: Runtime, { /// [`AppTemplate`] constructor. diff --git a/module-system/sov-modules-stf-template/src/lib.rs b/module-system/sov-modules-stf-template/src/lib.rs index 22428209eb..3d685f5065 100644 --- a/module-system/sov-modules-stf-template/src/lib.rs +++ b/module-system/sov-modules-stf-template/src/lib.rs @@ -64,9 +64,12 @@ pub enum SlashingReason { InvalidTransactionEncoding, } -impl - AppTemplate +impl AppTemplate where + C: Context, + Vm: Zkvm, + Cond: ValidityCondition, + B: BlobReaderTrait, RT: Runtime, { fn begin_slot(