Skip to content

Commit

Permalink
refactor(rooch-benchmarks): simplify tx building logic
Browse files Browse the repository at this point in the history
Removed unnecessary intermediate steps by directly returning the result of `build_and_sign`. This enhances code readability and reduces redundancy.
  • Loading branch information
popcnt1 committed Feb 3, 2025
1 parent dd2b21f commit 9c65dd8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crates/rooch-benchmarks/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ pub fn create_l2_tx(
_ => panic!("Unsupported tx type"),
};

let mut tx = test_transaction_builder.build_and_sign(action)?;
let _ = tx.tx_hash();
Ok(tx)
test_transaction_builder.build_and_sign(action)
}

pub fn find_block_height(dir: &Path) -> Result<Vec<u64>> {
Expand Down

0 comments on commit 9c65dd8

Please sign in to comment.