Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
citizen-stig committed Aug 10, 2023
1 parent e124d4c commit ace60a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion examples/demo-rollup/benches/rollup_bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::env;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;
use std::time::Duration;

Expand Down Expand Up @@ -47,10 +48,11 @@ fn rollup_bench(_bench: &mut Criterion) {

let mut demo = demo_runner.stf;
let sequencer_private_key = DefaultPrivateKey::generate();
let sequencer_da_address = CelestiaAddress::from_str(SEQUENCER_DA_ADDRESS).unwrap();
let demo_genesis_config = create_demo_genesis_config(
100000000,
sequencer_private_key.default_address(),
SEQUENCER_DA_ADDRESS.to_vec(),
sequencer_da_address.as_ref().to_vec(),
&sequencer_private_key,
&sequencer_private_key,
);
Expand Down
4 changes: 3 additions & 1 deletion examples/demo-rollup/benches/rollup_coarse_measure.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::env;
use std::path::PathBuf;
use std::str::FromStr;
use std::sync::Arc;
use std::time::{Duration, Instant};

Expand Down Expand Up @@ -95,10 +96,11 @@ async fn main() -> Result<(), anyhow::Error> {

let mut demo = demo_runner.stf;
let sequencer_private_key = DefaultPrivateKey::generate();
let sequencer_da_address = CelestiaAddress::from_str(SEQUENCER_DA_ADDRESS).unwrap();
let demo_genesis_config = create_demo_genesis_config(
100000000,
sequencer_private_key.default_address(),
SEQUENCER_DA_ADDRESS.to_vec(),
sequencer_da_address.as_ref().to_vec(),
&sequencer_private_key,
&sequencer_private_key,
);
Expand Down
6 changes: 4 additions & 2 deletions examples/demo-stf/src/tests/tx_revert_tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use borsh::BorshSerialize;
use const_rollup_config::SEQUENCER_DA_ADDRESS;
use sov_accounts::Response;
use sov_modules_api::default_context::DefaultContext;
use sov_modules_api::default_signature::private_key::DefaultPrivateKey;
Expand All @@ -19,6 +18,8 @@ use crate::tests::{has_tx_events, new_test_blob, TestBlob};

const SEQUENCER_BALANCE_DELTA: u64 = 1;
const SEQUENCER_BALANCE: u64 = LOCKED_AMOUNT + SEQUENCER_BALANCE_DELTA;
// Assume there was proper address and we converted it to bytes already.
const SEQUENCER_DA_ADDRESS: [u8; 32] = [1; 32];

#[test]
fn test_tx_revert() {
Expand Down Expand Up @@ -328,7 +329,8 @@ fn test_tx_bad_serialization() {
sov_election::GetResultResponse::Err("Election is not frozen".to_owned())
);

// Sequencer is not in list of allowed sequencers
// Sequencer is not in the list of allowed sequencers

let allowed_sequencer = runtime
.sequencer_registry
.sequencer_address(SEQUENCER_DA_ADDRESS.to_vec(), &mut working_set)
Expand Down

0 comments on commit ace60a6

Please sign in to comment.