@@ -21,8 +21,8 @@ use did::{
2121 DidSignature , DidVerificationKeyRelationship , KeyIdOf ,
2222} ;
2323use dip_provider_runtime_template:: {
24- AccountId as ProviderAccountId , MaxTotalKeyAgreementKeys , Runtime as ProviderRuntime ,
25- MAX_REVEALABLE_LINKED_ACCOUNTS ,
24+ AccountId as ProviderAccountId , Runtime as ProviderRuntime , MAX_REVEALABLE_LINKED_ACCOUNTS ,
25+ MAX_TOTAL_KEY_AGREEMENT_KEYS ,
2626} ;
2727use frame_support:: { pallet_prelude:: ValueQuery , storage_alias, traits:: Contains } ;
2828use frame_system:: { pallet_prelude:: BlockNumberFor , EnsureSigned } ;
@@ -48,7 +48,7 @@ use crate::{weights, AccountId, DidIdentifier, Runtime, RuntimeCall, RuntimeOrig
4848
4949// 3 is the attestation, delegation, and authentication key.
5050// 1 is the web3name.
51- const MAX_PROVIDER_REVEALABLE_KEYS_COUNT : u32 = MaxTotalKeyAgreementKeys + 3 + 1 + MAX_REVEALABLE_LINKED_ACCOUNTS ;
51+ const MAX_PROVIDER_REVEALABLE_KEYS_COUNT : u32 = MAX_TOTAL_KEY_AGREEMENT_KEYS + 3 + 1 + MAX_REVEALABLE_LINKED_ACCOUNTS ;
5252
5353/// The verifier logic is tied to the provider template runtime definition.
5454pub type ProviderTemplateProofVerifier = KiltVersionedParachainVerifier <
@@ -403,11 +403,11 @@ impl kilt_support::traits::GetWorstCase for ProviderTemplateProofVerifierWrapper
403403
404404#[ cfg( all( test, feature = "runtime-benchmarks" ) ) ]
405405mod worst_case_tests {
406- use kilt_dip_primitives:: { parachain :: DEFAULT_MAX_DID_MERKLE_LEAVES_REVEALED , VersionedDipParachainStateProof } ;
406+ use kilt_dip_primitives:: VersionedDipParachainStateProof ;
407407 use kilt_support:: traits:: GetWorstCase ;
408408 use pallet_dip_consumer:: benchmarking:: WorstCaseOf ;
409409
410- use crate :: ProviderTemplateProofVerifierWrapper ;
410+ use crate :: { dip :: MAX_PROVIDER_REVEALABLE_KEYS_COUNT , ProviderTemplateProofVerifierWrapper } ;
411411
412412 #[ test]
413413 fn worst_case_max_limits ( ) {
@@ -420,7 +420,7 @@ mod worst_case_tests {
420420 sp_io:: TestExternalities :: default ( ) . execute_with ( || {
421421 assert_eq ! (
422422 proof. dip_proof( ) . revealed( ) . len( ) ,
423- MAX_PROVIDER_REVEALABLE_KEYS as usize
423+ MAX_PROVIDER_REVEALABLE_KEYS_COUNT as usize
424424 ) ;
425425 } ) ;
426426 } ) ;
0 commit comments