-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
Recommend to implement for (). There is another Everything in Substrate with different meaning. Avoid using the same name. |
@@ -177,3 +180,15 @@ pub trait CallValidate<AccountId, Origin, Call> { | |||
call: &Call, | |||
) -> Result<(), TransactionValidityError>; | |||
} | |||
|
|||
/// CallValidate's default implementation, no additional validation | |||
pub enum Everything {} |
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 enum?
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.
Just follow the substrate style:
pub enum Everything {}
impl<T> Contains<T> for Everything {
fn contains(_: &T) -> bool {
true
}
}
and https://www.reddit.com/r/rust/comments/91mgqk/empty_enum_vs_empry_struct/. Enum
makes sense here, we don't need to instance this type in runtime.
It tooks me more time to choose the name between |
|
Companion for #155 (Parachain branch)
* Update market after order is created or comfirmed (#94) * Update order capacity * FIX CI * Update comment * Redesign fee market payment (#169) * Add basic solution * Refactor Slash Report * Refactor Slash Report 2 * Add other changes * Add tests * Self review * Rename to `message_and_confirm_reward` * Rename to `previous_relayers` * Rename to AssignedRelayer * Add more comments * Add more comments * Add new reward implementation * Rename and clean the code, needs more test * Add more docs here * Prepare for tests * Fix broken tests * Refactor * Rename * Remove RewardBook * Self review * Save one storage * Try fix ci * Handle Zero `CollateralPerOrder` (#176) * Companion 189 for darwinia-parachain (#194) * Update fee-market terminology (#192) (#199) * Support pangolin <> pangolin parachain alpha bridge (#190) * Cherry-pick #201 to `darwinia-parachain` (#203) * Del useless related to fee calculation (#201) * Delete estimate_delivery_transaction * Delete transaction_payment * Delete MessageTransaction * Code clean * Fix compile * Anchor polkadot-v0.9.27 * remove unused import * Fix test problem (#172) * fix ci * Add necessary reward event (#89) * Refactor the total reward cal * Code Clean * Fix test * Add OrderCreated event * Self review * Update comment * Update OrderCreate event to include relayers * Fix review * Enhance dispatch module (#121) * rm shift session manager pallet and clean useless imports (#128) * `Pre-dispatch` validate for main branch (#130) * Adjust the traits * Try fix compile * Fix tests * Code clean * Avoid duplicate evm transact fees (#136) * cherry pick #137 (#140) * cherry pick #137 * pick #141 Co-authored-by: bear <boundless.forest@outlook.com> * Drop error in `pre_dispatch` (#152) (#153) * Migrate to new s2s bridge (#149) * Add client-darwinia/client-crab/client-crab-parachain * Update CI * rever substrate commit * fix compile * remove transactional * Fix * Bump finality-grandpa to v0.16.0 * fix wrong import * make change follow paritytech/substrate#11415 * Add runtime-common to workspace and try fix test * Make changes follow paritytech/substrate#10242 * Code clean * More ci check * Remove integrity Co-authored-by: bear <boundless.forest@outlook.com> * Companion for #155 (#157) * Update market after order is created or comfirmed (#94) * Update order capacity * FIX CI * Update comment * Redesign fee market payment (#169) * Add basic solution * Refactor Slash Report * Refactor Slash Report 2 * Add other changes * Add tests * Self review * Rename to `message_and_confirm_reward` * Rename to `previous_relayers` * Rename to AssignedRelayer * Add more comments * Add more comments * Add new reward implementation * Rename and clean the code, needs more test * Add more docs here * Prepare for tests * Fix broken tests * Refactor * Rename * Remove RewardBook * Self review * Save one storage * Try fix ci * Handle Zero `CollateralPerOrder` (#176) * Update Fee market docs (#178) * Update doc * Update example * Move to `dev-dependencies` (#182) * Sync part.1 (#184) * Remove fee relates (#186) * Sync missing changes from different branches (#191) * Support pangolin <> pangolin parachain alpha bridge (#190) * Integrate `fee-market` to `FromThisChainMessageVerifier` (#189) * Run ignored crate * Fix tests * Add features * Fix compile * Update fee-market terminology (#192) * Del useless related to fee calculation (#201) * Delete estimate_delivery_transaction * Delete transaction_payment * Delete MessageTransaction * Code clean * master > polkadot-v0.9.27 * roll back bp-parachain Co-authored-by: bear <boundless.forest@outlook.com> Co-authored-by: Xavier Lau <xavier@inv.cafe> Co-authored-by: Aki Wu <aki.wu@itering.com> Co-authored-by: HackFisher <denny.wang@itering.io> Co-authored-by: HackFisher <hackfisher@gmail.com> Co-authored-by: fewensa <37804932+fewensa@users.noreply.github.com>
To make the runtime config for parachain easier.
type CallValidator = Everything;