Open HAOYUatHZ opened 2 years ago
i suggest a list. 'tx_slot_num'. eg [2, 16, 64, 512]
i suggest a list. 'tx_slot_num'. eg [2, 16, 64, 512]
This loos good. But I am not sure whether it's easy to achieve based on current codes.
pub static ref NTXS: usize = std::env::var("NTXS")
.expect("NTXS not set in ENV")
.parse::<usize>()
.expect("parse NTXS");
maybe we should refactor the current params
and use config.
pub fn parse_env_to_collection<F, I>(name: &str) -> F
where
I: FromStr,
I::Err: std::fmt::Debug,
F: FromIterator<I>,
{
get_env(name)
.split(',')
.map(|p| p.parse::<I>().unwrap())
.collect()
}
before
for now we use fixed
n_tx
n_tx
isparams::NTXS
after
we should replace
params::NTXS
withparams::TX_SLOT_NUM
for example,use
and then sort them
compare one by one (basic idea, should use
for loop
oriter
:then
flush_with_nop
also need the same logic to decide
n_tx
inpop_all_blocks
we should also record whether it's a large or medium or small blockI think we can record this info inpop_all_blocks
'sforge_with_txs
?so we addblock_type
(small
,medium
,large
) inL2BlockDetail