Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: spelling fix in benchmarks/transactions.cpp #299

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions benchmarks/transactions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ void reset_wallets(cbdc::transaction::wallet& w1,
/// @brief Time an N-in, 1-out transaction.
/// @brief Note: handles benchmark timing, do not time outside function.
/// @param sender
/// @param reciever
/// @param receiver
/// @param n_in
/// @param state
/// @return
inline bool generate_Nto1_tx(cbdc::transaction::wallet& sender,
cbdc::transaction::wallet& reciever,
cbdc::transaction::wallet& receiver,
uint32_t n_in,
benchmark::State& state) {
std::optional<cbdc::transaction::full_tx> maybe_tx{};
state.ResumeTiming();
maybe_tx = sender.send_to(n_in * 2, reciever.generate_key(), true).value();
maybe_tx = sender.send_to(n_in * 2, receiver.generate_key(), true).value();
state.PauseTiming();
if(maybe_tx.has_value()) {
sender.confirm_transaction(*maybe_tx);
reciever.confirm_transaction(*maybe_tx);
receiver.confirm_transaction(*maybe_tx);
return true;
}
return false;
Expand All @@ -64,22 +64,22 @@ inline bool generate_Nto1_tx(cbdc::transaction::wallet& sender,
/// @brief Time an N-in, 2-out transaction.
/// @brief Note: handles benchmark timing, do not time outside function.
/// @param sender
/// @param reciever
/// @param receiver
/// @param n_in
/// @param state
/// @return
inline bool generate_Nto2_tx(cbdc::transaction::wallet& sender,
cbdc::transaction::wallet& reciever,
cbdc::transaction::wallet& receiver,
uint32_t n_in,
benchmark::State& state) {
std::optional<cbdc::transaction::full_tx> maybe_tx{};
state.ResumeTiming();
maybe_tx
= sender.send_to(n_in * 2 - 1, reciever.generate_key(), true).value();
= sender.send_to(n_in * 2 - 1, receiver.generate_key(), true).value();
state.PauseTiming();
if(maybe_tx.has_value()) {
sender.confirm_transaction(*maybe_tx);
reciever.confirm_transaction(*maybe_tx);
receiver.confirm_transaction(*maybe_tx);
return true;
}
return false;
Expand Down
Loading