Skip to content

Commit

Permalink
Fixed nonce late increase
Browse files Browse the repository at this point in the history
  • Loading branch information
EduMenges committed Nov 15, 2024
1 parent bf55aaa commit 2f95828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/account/TransactionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ namespace sgns
void TransactionManager::EnqueueTransaction( std::shared_ptr<IGeniusTransactions> element )
{
std::lock_guard<std::mutex> lock( mutex_m );
this->account_m->nonce += 1;
out_transactions.emplace_back( std::move( element ) );
}

Expand Down Expand Up @@ -234,7 +235,6 @@ namespace sgns
data_transaction.put( transaction->SerializeByteVector() );

db_m->Put( { transaction_path }, data_transaction );
account_m->nonce++;

auto maybe_last_hash = block_storage_m->getLastFinalizedBlockHash();
auto maybe_last_header = block_storage_m->getBlockHeader( maybe_last_hash.value() );
Expand Down

0 comments on commit 2f95828

Please sign in to comment.