mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 05:25:48 +00:00
Bounties use SpendOrigin (#12808)
* Bounties use SpendOrigin * Fix tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * tests: increase spend limits Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix benchmarks Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix child-bounties tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * ".git/.scripts/bench-bot.sh" pallet dev pallet_bounties Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <>
This commit is contained in:
@@ -97,7 +97,7 @@ benchmarks_instance_pallet! {
|
||||
let (caller, curator, fee, value, reason) = setup_bounty::<T, I>(0, T::MaximumReasonLength::get());
|
||||
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
|
||||
let bounty_id = BountyCount::<T, I>::get() - 1;
|
||||
let approve_origin = T::ApproveOrigin::successful_origin();
|
||||
let approve_origin = T::SpendOrigin::successful_origin();
|
||||
}: _<T::RuntimeOrigin>(approve_origin, bounty_id)
|
||||
|
||||
propose_curator {
|
||||
@@ -106,10 +106,10 @@ benchmarks_instance_pallet! {
|
||||
let curator_lookup = T::Lookup::unlookup(curator);
|
||||
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
|
||||
let bounty_id = BountyCount::<T, I>::get() - 1;
|
||||
let approve_origin = T::ApproveOrigin::successful_origin();
|
||||
let approve_origin = T::SpendOrigin::successful_origin();
|
||||
Bounties::<T, I>::approve_bounty(approve_origin, bounty_id)?;
|
||||
Treasury::<T, I>::on_initialize(T::BlockNumber::zero());
|
||||
let approve_origin = T::ApproveOrigin::successful_origin();
|
||||
let approve_origin = T::SpendOrigin::successful_origin();
|
||||
}: _<T::RuntimeOrigin>(approve_origin, bounty_id, curator_lookup, fee)
|
||||
|
||||
// Worst case when curator is inactive and any sender unassigns the curator.
|
||||
@@ -128,7 +128,7 @@ benchmarks_instance_pallet! {
|
||||
let curator_lookup = T::Lookup::unlookup(curator.clone());
|
||||
Bounties::<T, I>::propose_bounty(RawOrigin::Signed(caller).into(), value, reason)?;
|
||||
let bounty_id = BountyCount::<T, I>::get() - 1;
|
||||
let approve_origin = T::ApproveOrigin::successful_origin();
|
||||
let approve_origin = T::SpendOrigin::successful_origin();
|
||||
Bounties::<T, I>::approve_bounty(approve_origin.clone(), bounty_id)?;
|
||||
Treasury::<T, I>::on_initialize(T::BlockNumber::zero());
|
||||
Bounties::<T, I>::propose_curator(approve_origin, bounty_id, curator_lookup, fee)?;
|
||||
|
||||
Reference in New Issue
Block a user