github.com/aakash4dev/cometbft@v0.38.2/mempool/mempoolTx.go (about)

     1  package mempool
     2  
     3  import (
     4  	"sync/atomic"
     5  
     6  	"github.com/aakash4dev/cometbft/types"
     7  )
     8  
     9  // mempoolTx is an entry in the mempool
    10  type mempoolTx struct {
    11  	height    int64    // height that this tx had been validated in
    12  	gasWanted int64    // amount of gas this tx states it will require
    13  	tx        types.Tx // validated by the application
    14  }
    15  
    16  // Height returns the height for this transaction
    17  func (memTx *mempoolTx) Height() int64 {
    18  	return atomic.LoadInt64(&memTx.height)
    19  }