refactor all

This commit is contained in:
Sergio Chouhy
2025-08-12 12:18:13 -03:00
parent bab1112251
commit 82907f5d8f
14 changed files with 138 additions and 70 deletions
-1
View File
@@ -120,7 +120,6 @@ impl SequencerCore {
block_id: new_block_height,
prev_block_id: self.chain_height,
transactions: valid_transactions,
data: vec![],
prev_block_hash,
};
@@ -89,14 +89,13 @@ mod tests {
prev_block_hash: [0; 32],
hash: [1; 32],
transactions: vec![],
data: vec![],
};
// Start an empty node store
let mut node_store =
SequecerBlockStore::open_db_with_genesis(path, Some(genesis_block)).unwrap();
let tx = common::test_utils::produce_dummy_empty_transaction();
let block = common::test_utils::produce_dummy_block(1, None, vec![tx.clone()], vec![]);
let block = common::test_utils::produce_dummy_block(1, None, vec![tx.clone()]);
// Try retrieve a tx that's not in the chain yet.
let retrieved_tx = node_store.get_transaction_by_hash(tx.hash());
@@ -49,7 +49,6 @@ impl SequecerChainStore {
block_id: genesis_id,
prev_block_id: genesis_id.saturating_sub(1),
transactions: vec![],
data: data.to_vec(),
prev_block_hash,
};