Skip to content

Commit

Permalink
revert get_previous_tx from pool, without lock.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jowen committed Jun 14, 2018
1 parent 1ba02fa commit 1c6d389
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/lib/blockchain/validate_transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,11 @@ bool validate_transaction::get_previous_tx(chain::transaction& prev_tx,
{
prev_height = 0;
if (pool_) {
if (blockchain_.get_transaction(input.previous_output.hash, prev_tx, prev_height)) {
return true; // find in block chain or memory pool
if (blockchain_.get_transaction(prev_tx, prev_height, input.previous_output.hash)) {
return true; // find in block chain
}
if (pool_->find(prev_tx, input.previous_output.hash)) {
return true; // find in memory pool
}
}
else {
Expand Down

0 comments on commit 1c6d389

Please sign in to comment.