Skip to content

Commit

Permalink
Add lock to creation of pending transaction stream (hyperledger#5612)
Browse files Browse the repository at this point in the history
* Add lock to creation of pending transaction stream

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>

* Alternative synchonization of signalInvalidAndRemoveDependentTransactions

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Matthew Whitehead <matthew1001@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Matthew Whitehead <matthew1001@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
  • Loading branch information
3 people authored Jun 26, 2023
1 parent 2beb15a commit f43ae51
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,9 @@ public List<Transaction> signalInvalidAndGetDependentTransactions(final Transact

@Override
public void signalInvalidAndRemoveDependentTransactions(final Transaction transaction) {
signalInvalidAndGetDependentTransactions(transaction).forEach(this::removeTransaction);
synchronized (lock) {
signalInvalidAndGetDependentTransactions(transaction).forEach(this::removeTransaction);
}
}

@Override
Expand Down

0 comments on commit f43ae51

Please sign in to comment.