Fix missing registration of PeerTransactionTracker to dropped tx notifications (#7858)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
pull/7862/head
Fabio Di Fabio 2 weeks ago committed by GitHub
parent e17ebc5e8d
commit 62b2c500c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionBroadcaster.java
  2. 1
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPool.java

@ -37,7 +37,8 @@ import com.google.common.annotations.VisibleForTesting;
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);
@ -219,4 +220,9 @@ public class TransactionBroadcaster implements TransactionBatchAddedListener {
destinationList.add(sourceList.remove(i));
}
}
@Override
public void onTransactionDropped(final Transaction transaction, final RemovalReason reason) {
transactionTracker.onTransactionDropped(transaction, reason);
}
}

@ -139,6 +139,7 @@ public class TransactionPool implements BlockAddedObserver {
subscribePendingTransactions(this::mapBlobsOnTransactionAdded);
subscribeDroppedTransactions(
(transaction, reason) -> unmapBlobsOnTransactionDropped(transaction));
subscribeDroppedTransactions(transactionBroadcaster);
}
private void initLogForReplay() {

Loading…
Cancel
Save