Skip to content

Commit

Permalink
Fix missing registration of PeerTransactionTracker to dropped tx noti…
Browse files Browse the repository at this point in the history
…fications

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
  • Loading branch information
fab-10 committed Nov 5, 2024
1 parent ef9d1ab commit 59ba97c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TransactionBroadcaster implements TransactionBatchAddedListener {
public class TransactionBroadcaster
implements TransactionBatchAddedListener, PendingTransactionDroppedListener {
private static final Logger LOG = LoggerFactory.getLogger(TransactionBroadcaster.class);

private static final EnumSet<TransactionType> ANNOUNCE_HASH_ONLY_TX_TYPES = EnumSet.of(BLOB);
Expand Down Expand Up @@ -219,4 +220,9 @@ private void movePeersBetweenLists(
destinationList.add(sourceList.remove(i));
}
}

@Override
public void onTransactionDropped(final Transaction transaction, final RemovalReason reason) {
transactionTracker.onTransactionDropped(transaction, reason);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public TransactionPool(
subscribePendingTransactions(this::mapBlobsOnTransactionAdded);
subscribeDroppedTransactions(
(transaction, reason) -> unmapBlobsOnTransactionDropped(transaction));
subscribeDroppedTransactions(transactionBroadcaster);
}

private void initLogForReplay() {
Expand Down

0 comments on commit 59ba97c

Please sign in to comment.