Skip to content

Commit

Permalink
benches/tx: fix change_consensus_key by adding the extra req sig
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic authored and brentstone committed Dec 15, 2023
1 parent de2e176 commit dd28da1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions benches/txs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,21 +686,21 @@ fn change_validator_commission(c: &mut Criterion) {

fn change_consensus_key(c: &mut Criterion) {
let mut csprng = rand::rngs::OsRng {};
let consensus_key = ed25519::SigScheme::generate(&mut csprng)
let consensus_sk = ed25519::SigScheme::generate(&mut csprng)
.try_to_sk::<common::SecretKey>()
.unwrap()
.to_public();
.unwrap();
let consensus_pk = consensus_sk.to_public();

let shell = BenchShell::default();
let signed_tx = shell.generate_tx(
TX_CHANGE_CONSENSUS_KEY_WASM,
ConsensusKeyChange {
validator: defaults::validator_address(),
consensus_key,
consensus_key: consensus_pk,
},
None,
None,
vec![&defaults::validator_keypair()],
vec![&defaults::validator_keypair(), &consensus_sk],
);

c.bench_function("change_consensus_key", |b| {
Expand Down

0 comments on commit dd28da1

Please sign in to comment.