mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-04 14:23:11 +00:00
add setup_sequencer_config for tests
This commit is contained in:
parent
603461f19a
commit
4f61d792bc
@ -254,3 +254,32 @@ impl SequencerCore {
|
||||
Ok(self.chain_height - 1)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use std::{fmt::format, path::PathBuf};
|
||||
|
||||
use rand::Rng;
|
||||
use storage::transaction::{Transaction, TxKind};
|
||||
use transaction_mempool::TransactionMempool;
|
||||
|
||||
fn setup_sequencer_config() -> SequencerConfig {
|
||||
let mut rng = rand::thread_rng();
|
||||
let random_u8: u8 = rng.gen();
|
||||
|
||||
let path_str = format!("/tmp/sequencer_{:?}", random_u8);
|
||||
|
||||
SequencerConfig {
|
||||
home: PathBuf::from(path_str),
|
||||
override_rust_log: Some("info".to_string()),
|
||||
genesis_id: 1,
|
||||
is_genesis_random: false,
|
||||
max_num_tx_in_block: 10,
|
||||
block_create_timeout_millis: 1000,
|
||||
port: 8080,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user