mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 19:29:56 +00:00
inital commit, which is clearly not initial
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
26
runtime/common/src/benchmarking.rs
Normal file
26
runtime/common/src/benchmarking.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use primitives::{AccountId, Balance};
|
||||
use pallet_treasury::ArgumentsFactory;
|
||||
use sp_core::crypto::FromEntropy;
|
||||
use frame_support::traits::tokens::{Pay, PaymentStatus};
|
||||
|
||||
pub struct BenchmarkTreasuryHelper;
|
||||
impl ArgumentsFactory<(), AccountId> for BenchmarkTreasuryHelper {
|
||||
fn create_asset_kind(_seed: u32) -> () { () }
|
||||
fn create_beneficiary(seed: [u8; 32]) -> AccountId {
|
||||
AccountId::from_entropy(&mut seed.as_slice()).unwrap()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BenchmarkTreasuryPaymaster;
|
||||
impl Pay for BenchmarkTreasuryPaymaster {
|
||||
type Beneficiary = AccountId;
|
||||
type Balance = Balance;
|
||||
type Id = ();
|
||||
type AssetKind = ();
|
||||
type Error = ();
|
||||
|
||||
fn pay(_: &Self::Beneficiary, _: Self::AssetKind, _: Self::Balance) -> Result<Self::Id, Self::Error> { Ok(()) }
|
||||
fn check_payment(_: Self::Id) -> PaymentStatus { PaymentStatus::Success }
|
||||
fn ensure_successful(_: &Self::Beneficiary, _: Self::AssetKind, _: Self::Balance) {}
|
||||
fn ensure_concluded(_: Self::Id) {}
|
||||
}
|
||||
Reference in New Issue
Block a user