|
|
|
@ -129,6 +129,7 @@ public class TransactionPool implements BlockAddedObserver { |
|
|
|
|
this.blockAddedEventOrderedProcessor = |
|
|
|
|
ethContext.getScheduler().createOrderedProcessor(this::processBlockAddedEvent); |
|
|
|
|
this.cacheForBlobsOfTransactionsAddedToABlock = blobCache; |
|
|
|
|
initializeBlobMetrics(); |
|
|
|
|
initLogForReplay(); |
|
|
|
|
subscribePendingTransactions(this::mapBlobsOnTransactionAdded); |
|
|
|
|
subscribeDroppedTransactions(this::unmapBlobsOnTransactionDropped); |
|
|
|
@ -686,6 +687,19 @@ public class TransactionPool implements BlockAddedObserver { |
|
|
|
|
return isPoolEnabled.get(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getBlobCacheSize() { |
|
|
|
|
return (int) cacheForBlobsOfTransactionsAddedToABlock.size(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getBlobMapSize() { |
|
|
|
|
return mapOfBlobsInTransactionPool.size(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void initializeBlobMetrics() { |
|
|
|
|
metrics.createBlobCacheSizeMetric(this::getBlobCacheSize); |
|
|
|
|
metrics.createBlobMapSizeMetric(this::getBlobMapSize); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class PendingTransactionsListenersProxy { |
|
|
|
|
private final Subscribers<PendingTransactionAddedListener> onAddedListeners = |
|
|
|
|
Subscribers.create(); |
|
|
|
|