mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-05 23:03:06 +00:00
minor changes
This commit is contained in:
parent
c47693b9b0
commit
4648f46f51
@ -1842,6 +1842,7 @@ pub async fn main_tests_runner() -> Result<()> {
|
|||||||
home_dir,
|
home_dir,
|
||||||
test_success_private_transfer_to_another_owned_account_cont_run_path
|
test_success_private_transfer_to_another_owned_account_cont_run_path
|
||||||
);
|
);
|
||||||
|
tps_test().await;
|
||||||
}
|
}
|
||||||
"all_private" => {
|
"all_private" => {
|
||||||
test_cleanup_wrap!(
|
test_cleanup_wrap!(
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
use std::fmt::Display;
|
use std::{fmt::Display, time::Instant};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use common::{
|
use common::{
|
||||||
@ -146,6 +146,7 @@ impl SequencerCore {
|
|||||||
|
|
||||||
///Produces new block from transactions in mempool
|
///Produces new block from transactions in mempool
|
||||||
pub fn produce_new_block_with_mempool_transactions(&mut self) -> Result<u64> {
|
pub fn produce_new_block_with_mempool_transactions(&mut self) -> Result<u64> {
|
||||||
|
let now = Instant::now();
|
||||||
let new_block_height = self.chain_height + 1;
|
let new_block_height = self.chain_height + 1;
|
||||||
|
|
||||||
let mut num_valid_transactions_in_block = 0;
|
let mut num_valid_transactions_in_block = 0;
|
||||||
@ -175,6 +176,8 @@ impl SequencerCore {
|
|||||||
|
|
||||||
let curr_time = chrono::Utc::now().timestamp_millis() as u64;
|
let curr_time = chrono::Utc::now().timestamp_millis() as u64;
|
||||||
|
|
||||||
|
let num_txs_in_block = valid_transactions.len();
|
||||||
|
|
||||||
let hashable_data = HashableBlockData {
|
let hashable_data = HashableBlockData {
|
||||||
block_id: new_block_height,
|
block_id: new_block_height,
|
||||||
transactions: valid_transactions,
|
transactions: valid_transactions,
|
||||||
@ -188,6 +191,12 @@ impl SequencerCore {
|
|||||||
|
|
||||||
self.chain_height = new_block_height;
|
self.chain_height = new_block_height;
|
||||||
|
|
||||||
|
log::info!(
|
||||||
|
"Created block with {} transactions in {} seconds",
|
||||||
|
num_txs_in_block,
|
||||||
|
now.elapsed().as_secs()
|
||||||
|
);
|
||||||
|
|
||||||
Ok(self.chain_height)
|
Ok(self.chain_height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user