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

Commit

Permalink
nanoseconds to seconds fix
Browse files Browse the repository at this point in the history
  • Loading branch information
calbera committed Feb 1, 2024
1 parent 1f5b812 commit c67c253
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cosmos/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func New(
p.logger,
p.ExecutionLayer.Backend().Blockchain(),
p.ExecutionLayer.Backend().TxPool(),
int64(cfg.Polar.LegacyTxPool.Lifetime),
cfg.Polar.LegacyTxPool.Lifetime,
&p.blockBuilderMu,
priceLimit,
p.cfg.Polar.IsValidator,
Expand Down
6 changes: 3 additions & 3 deletions cosmos/runtime/txpool/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type GethTxPool interface {
type Mempool struct {
eth.TxPool
logger log.Logger
lifetime int64
lifetime int64 // mempool uses seconds as a unit for lifetime
chain core.ChainReader
handler Lifecycle
crc CometRemoteCache
Expand All @@ -88,7 +88,7 @@ type Mempool struct {
// New creates a new Mempool.
func New(
logger log.Logger,
chain core.ChainReader, txpool eth.TxPool, lifetime int64,
chain core.ChainReader, txpool eth.TxPool, lifetime time.Duration,
blockBuilderMu *sync.RWMutex, priceLimit *big.Int, isValidator,
forceBroadcastOnRecheck bool,
validatorJSONRPC string,
Expand Down Expand Up @@ -123,7 +123,7 @@ func New(
logger: logger,
TxPool: txpool,
chain: chain,
lifetime: lifetime,
lifetime: int64(lifetime.Seconds()),
crc: newCometRemoteCache(),
blockBuilderMu: blockBuilderMu,
priceLimit: priceLimit,
Expand Down

0 comments on commit c67c253

Please sign in to comment.