Skip to content

Commit 36909cb

Browse files
author
wangchao
committed
fix tx pool interface called with wrong seq parameter
1 parent e1daffe commit 36909cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/peersafe/app/consensus/PConsensus.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ PConsensus<Adaptor>::onViewChange()
581581
timeOutCount_ = 0;
582582

583583
//clear avoid
584-
adaptor_.app_.getTxPool().clearAvoid(previousLedger_.seq());
584+
adaptor_.app_.getTxPool().clearAvoid(previousLedger_.seq() + 1);
585585

586586
viewChangeManager_.onViewChanged(view_);
587587
if (bWaitingInit_)
@@ -796,7 +796,7 @@ PConsensus<Adaptor>::gotTxSet(
796796
{
797797
//update avoid if we got the right tx-set
798798
if (adaptor_.validating())
799-
adaptor_.app_.getTxPool().updateAvoid(txSet, previousLedger_.seq());
799+
adaptor_.app_.getTxPool().updateAvoid(txSet, previousLedger_.seq() + 1);
800800

801801
auto set = txSet.map_->snapShot(false);
802802
//this place has a txSet copy,what's the time it costs?

0 commit comments

Comments
 (0)