File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -48,22 +48,13 @@ mod benches {
4848 /// Benchmark `announce_next_key`.
4949 #[ benchmark]
5050 fn announce_next_key ( ) {
51- // Generate a deterministic dev key in the host keystore (for benchmarks).
52- // Any 4-byte KeyTypeId works for generation; it does not affect AccountId derivation.
53- const KT : KeyTypeId = KeyTypeId ( * b"benc" ) ;
54- let alice_pub: sr25519:: Public = sr25519_generate ( KT , Some ( "//Alice" . as_bytes ( ) . to_vec ( ) ) ) ;
55- let alice_acc: AccountId32 = alice_pub. into ( ) ;
56-
57- // Make this account an Aura authority for the generic runtime.
58- seed_aura_authority_from_sr25519 :: < T > ( & alice_pub) ;
59-
6051 // Valid Kyber768 public key length per pallet check.
6152 const KYBER768_PK_LEN : usize = 1184 ;
6253 let public_key: BoundedVec < u8 , ConstU32 < 2048 > > = bounded_pk :: < 2048 > ( KYBER768_PK_LEN ) ;
6354
64- // Measure: dispatch the extrinsic .
55+ // Dispatch as UNSIGNED: the pallet expects `ensure_none(origin)?;` .
6556 #[ extrinsic_call]
66- announce_next_key ( RawOrigin :: Signed ( alice_acc . clone ( ) ) , public_key. clone ( ) ) ;
57+ announce_next_key ( RawOrigin :: None , public_key. clone ( ) ) ;
6758
6859 // Assert: NextKey should be set exactly.
6960 let stored = NextKey :: < T > :: get ( ) . expect ( "must be set by announce_next_key" ) ;
You can’t perform that action at this time.
0 commit comments