mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 03:35:43 +00:00
Add integrity check for signed extensions (#1780)
* Add integrity check for signed extensions * Remove unneeded type specification
This commit is contained in:
committed by
Bastian Köcher
parent
4cdb85247e
commit
2ff3a7aa38
@@ -26,6 +26,7 @@ use bp_runtime::{Chain, ChainId};
|
||||
use codec::Encode;
|
||||
use frame_support::{storage::generator::StorageValue, traits::Get};
|
||||
use frame_system::limits;
|
||||
use sp_runtime::traits::SignedExtension;
|
||||
|
||||
/// Macro that ensures that the runtime configuration and chain primitives crate are sharing
|
||||
/// the same types (index, block number, hash, hasher, account id and header).
|
||||
@@ -319,3 +320,15 @@ pub fn check_message_lane_weights<C: Chain, T: frame_system::Config>(
|
||||
this_chain_max_unconfirmed_messages,
|
||||
);
|
||||
}
|
||||
|
||||
/// Check that the `AdditionalSigned` type of a wrapped runtime is the same as the one of the
|
||||
/// corresponding actual runtime.
|
||||
///
|
||||
/// This method doesn't perform any `assert`. If the condition is not true it will generate a
|
||||
/// compile-time error.
|
||||
pub fn check_additional_signed<SignedExt, IndirectSignedExt: SignedExtension>()
|
||||
where
|
||||
SignedExt: SignedExtension,
|
||||
IndirectSignedExt: SignedExtension<AdditionalSigned = SignedExt::AdditionalSigned>,
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user