Struct saito_rust::test_utilities::test_manager::TestManager [−][src]
pub struct TestManager {
pub mempool_lock: Arc<RwLock<Mempool>>,
pub blockchain_lock: Arc<RwLock<Blockchain>>,
pub wallet_lock: Arc<RwLock<Wallet>>,
pub latest_block_hash: SaitoHash,
}
Fields
mempool_lock: Arc<RwLock<Mempool>>
blockchain_lock: Arc<RwLock<Blockchain>>
wallet_lock: Arc<RwLock<Wallet>>
latest_block_hash: SaitoHash
Implementations
pub fn new(
blockchain_lock: Arc<RwLock<Blockchain>>,
wallet_lock: Arc<RwLock<Wallet>>
) -> Self
pub async fn add_block(
&mut self,
timestamp: u64,
vip_txs: usize,
normal_txs: usize,
has_golden_ticket: bool,
additional_txs: Vec<Transaction>
) -> SaitoHash
pub async fn add_block_on_hash(
&mut self,
timestamp: u64,
vip_txs: usize,
normal_txs: usize,
has_golden_ticket: bool,
additional_txs: Vec<Transaction>,
parent_hash: SaitoHash
) -> SaitoHash
pub async fn generate_blockchain(
&mut self,
chain_length: u64,
starting_hash: SaitoHash
) -> SaitoHash
pub async fn generate_block(
&self,
parent_hash: SaitoHash,
timestamp: u64,
vip_transactions: usize,
normal_transactions: usize,
golden_ticket: bool,
additional_transactions: Vec<Transaction>
) -> Block
pub async fn generate_block_and_metadata(
&self,
parent_hash: SaitoHash,
timestamp: u64,
vip_transactions: usize,
normal_transactions: usize,
golden_ticket: bool,
additional_transactions: Vec<Transaction>
) -> Block
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TestManager
impl Send for TestManager
impl Sync for TestManager
impl Unpin for TestManager
impl !UnwindSafe for TestManager
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more