-
Notifications
You must be signed in to change notification settings - Fork 709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate pallet-preimage to benchmark v2 #6277
Migrate pallet-preimage to benchmark v2 #6277
Conversation
#[benchmark] | ||
fn request_preimage() { | ||
let o = T::ManagerOrigin::try_successful_origin() | ||
.expect("ManagerOrigin has no successful origin required for the benchmark"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this an expect now? The pallet is also usable without manager origin.
It returned BenchmarkError::Weightless
before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that error is meaningless.
Same as:
polkadot-sdk/substrate/frame/treasury/src/benchmarking.rs
Lines 121 to 126 in 06debd0
let origin = | |
T::SpendOrigin::try_successful_origin().map_err(|_| BenchmarkError::Weightless)?; | |
let beneficiary = T::Lookup::lookup(beneficiary_lookup.clone()).unwrap(); | |
#[extrinsic_call] | |
_(origin as T::RuntimeOrigin, value, beneficiary_lookup); |
It was not part of the benchmark(#[extrinsic_call]
) code block. Additionally, I believe the original .expect
message is more readable. So I reuse it.
What do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also can be found here
.expect("ManagerOrigin has no successful origin required for the benchmark"); |
bot bench substrate-pallet --features=runtime-benchmarks --pallet=pallet_preimage |
@re-gius https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/7837857 was started for your command Comment |
…=dev --target_dir=substrate --features=runtime-benchmarks --pallet=pallet_preimage
@re-gius Command |
b3ab312
/tip small |
@re-gius A referendum for a small (20 DOT) tip was successfully submitted for @AurevoirXavier (156HGo9setPcU2qhFMVWLkcmtCEGySLwNqa3DaEiYSWtte4Y on polkadot). |
The referendum has appeared on Polkassembly. |
Part of: