From b80e42c23345430db75ef4e69fda2f5bf84b9ef4 Mon Sep 17 00:00:00 2001 From: lemunozm Date: Fri, 22 Sep 2023 15:01:28 +0200 Subject: [PATCH] bypass account permission for benchmarking --- runtime/altair/src/lib.rs | 2 +- runtime/centrifuge/src/lib.rs | 2 +- runtime/development/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/altair/src/lib.rs b/runtime/altair/src/lib.rs index 730e9795f9..7734f2ed3c 100644 --- a/runtime/altair/src/lib.rs +++ b/runtime/altair/src/lib.rs @@ -1745,7 +1745,7 @@ impl< ), }; - if is_tranche_investor { + if is_tranche_investor || cfg!(feature = "runtime-benchmarks") { Ok(()) } else { // TODO: We should adapt the permissions pallets interface to return an error diff --git a/runtime/centrifuge/src/lib.rs b/runtime/centrifuge/src/lib.rs index a360d2f8ca..287b203baf 100644 --- a/runtime/centrifuge/src/lib.rs +++ b/runtime/centrifuge/src/lib.rs @@ -1746,7 +1746,7 @@ impl< ), }; - if is_tranche_investor { + if is_tranche_investor || cfg!(feature = "runtime-benchmarks") { Ok(()) } else { // TODO: We should adapt the permissions pallets interface to return an error diff --git a/runtime/development/src/lib.rs b/runtime/development/src/lib.rs index e0d29261ec..a4054cf4e7 100644 --- a/runtime/development/src/lib.rs +++ b/runtime/development/src/lib.rs @@ -1727,7 +1727,7 @@ impl< ), }; - if is_tranche_investor { + if is_tranche_investor || cfg!(feature = "runtime-benchmarks") { Ok(()) } else { // TODO: We should adapt the permissions pallets interface to return an error