Skip to content

Commit

Permalink
Log whenever an ETX is expired
Browse files Browse the repository at this point in the history
  • Loading branch information
jdowning100 authored and gameofpointers committed Oct 21, 2023
1 parent a10d98f commit 218ec8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/types/etx_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package types

import (
"github.com/dominant-strategies/go-quai/common"
"github.com/dominant-strategies/go-quai/log"
"github.com/dominant-strategies/go-quai/params"
)

Expand Down Expand Up @@ -36,6 +37,7 @@ func (set *EtxSet) Update(newInboundEtxs Transactions, currentHeight uint64) {
availableAtBlock := entry.Height
etxExpirationHeight := availableAtBlock + params.EtxExpirationAge
if currentHeight > etxExpirationHeight {
log.Warn("ETX expired", "hash", txHash, "gasTipCap", entry.ETX.GasTipCap(), "gasFeeCap", entry.ETX.GasFeeCap(), "gasLimit", entry.ETX.Gas(), "availableAtBlock", availableAtBlock, "etxExpirationHeight", etxExpirationHeight, "currentHeight", currentHeight)
delete(*set, txHash)
}
}
Expand Down

0 comments on commit 218ec8c

Please sign in to comment.