Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
remove Stats
Browse files Browse the repository at this point in the history
  • Loading branch information
po-bera committed Jan 19, 2024
1 parent a28332d commit 44740fe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions cosmos/runtime/txpool/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ type SdkTx interface {
// TxSubProvider.
type TxSubProvider interface {
SubscribeTransactions(ch chan<- core.NewTxsEvent, reorgs bool) event.Subscription
Stats() (int, int)
}

// TxSerializer provides an interface to Serialize Geth Transactions to Bytes (via sdk.Tx).
Expand Down Expand Up @@ -153,9 +152,6 @@ func (h *handler) mainLoop() {
case err = <-h.txsSub.Err():
h.stopCh <- struct{}{}
case event := <-h.txsCh:
pending, queue := h.txPool.Stats()
telemetry.SetGauge(float32(pending), MetricKeyTxPoolPending)
telemetry.SetGauge(float32(queue), MetricKeyTxPoolQueue)
telemetry.IncrCounter(float32(len(event.Txs)), MetricKeyCometLocalTxs)
h.broadcastTransactions(event.Txs)
}
Expand Down
5 changes: 0 additions & 5 deletions cosmos/runtime/txpool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ func (m *Mempool) Stop() error {

// Insert attempts to insert a Tx into the app-side mempool returning an error upon failure.
func (m *Mempool) Insert(ctx context.Context, sdkTx sdk.Tx) error {
txPoolPending, txPoolQueue := m.TxPool.Stats()
telemetry.SetGauge(float32(txPoolPending), MetricKeyTxPoolPending)
telemetry.SetGauge(float32(txPoolQueue), MetricKeyTxPoolQueue)

sCtx := sdk.UnwrapSDKContext(ctx)
msgs := sdkTx.GetMsgs()
if len(msgs) != 1 {
Expand All @@ -130,7 +126,6 @@ func (m *Mempool) Insert(ctx context.Context, sdkTx sdk.Tx) error {
// Insert the tx into the txpool as a remote.
m.blockBuilderMu.RLock()
errs := m.TxPool.Add([]*ethtypes.Transaction{ethTx}, false, false)
telemetry.SetGauge(float32(m.CountTx()), MetricKeyMempoolSize)
m.blockBuilderMu.RUnlock()
if len(errs) > 0 {
// Handle case where a node broadcasts to itself, we don't want it to fail CheckTx.
Expand Down
4 changes: 0 additions & 4 deletions cosmos/runtime/txpool/mocks/tx_sub_provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 44740fe

Please sign in to comment.