minor changes

This commit is contained in:
Sergio Chouhy 2025-10-24 22:18:41 -03:00
parent c47693b9b0
commit 4648f46f51
2 changed files with 11 additions and 1 deletions

View File

@ -1842,6 +1842,7 @@ pub async fn main_tests_runner() -> Result<()> {
home_dir,
test_success_private_transfer_to_another_owned_account_cont_run_path
);
tps_test().await;
}
"all_private" => {
test_cleanup_wrap!(

View File

@ -1,4 +1,4 @@
use std::fmt::Display;
use std::{fmt::Display, time::Instant};
use anyhow::Result;
use common::{
@ -146,6 +146,7 @@ impl SequencerCore {
///Produces new block from transactions in mempool
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 mut num_valid_transactions_in_block = 0;
@ -175,6 +176,8 @@ impl SequencerCore {
let curr_time = chrono::Utc::now().timestamp_millis() as u64;
let num_txs_in_block = valid_transactions.len();
let hashable_data = HashableBlockData {
block_id: new_block_height,
transactions: valid_transactions,
@ -188,6 +191,12 @@ impl SequencerCore {
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)
}
}