Documentation ¶
Index ¶
- func Compress(txList []byte) ([]byte, error)
- func Decompress(compressedTxList []byte) ([]byte, error)
- func EtherToWei(ether float64) (*big.Int, error)
- func GWeiToWei(gwei float64) (*big.Int, error)
- func IsNil(i interface{}) bool
- func LoadEnv()
- func Max[T constraints.Integer](a, b T) T
- func Min[T constraints.Integer](a, b T) T
- func RandUint32(max *big.Int) uint32
- func RandUint64(max *big.Int) uint64
- func WeiToEther(wei *big.Int) *big.Float
- func WeiToGWei(wei *big.Int) *big.Float
- type TxMgrSelector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶
Decompress decompresses the given txList bytes using zlib.
func EtherToWei ¶
EtherToWei converts ether value to wei value.
func WeiToEther ¶
WeiToEther converts wei value to ether value.
Types ¶
type TxMgrSelector ¶
type TxMgrSelector struct {
// contains filtered or unexported fields
}
TxMgrSelector is responsible for selecting the correct transaction manager, it will choose the transaction manager for a private mempool if it is available and works well, otherwise it will choose the normal transaction manager.
func NewTxMgrSelector ¶
func NewTxMgrSelector( txMgr *txmgr.SimpleTxManager, privateTxMgr *txmgr.SimpleTxManager, privateTxMgrRetryInterval *time.Duration, ) *TxMgrSelector
NewTxMgrSelector creates a new TxMgrSelector instance.
func (*TxMgrSelector) RecordPrivateTxMgrFailed ¶
func (s *TxMgrSelector) RecordPrivateTxMgrFailed()
RecordPrivateTxMgrFailed records the time when the private transaction manager has failed.
func (*TxMgrSelector) Select ¶
func (s *TxMgrSelector) Select() (*txmgr.SimpleTxManager, bool)
Select selects a transaction manager based on the current state.
Click to show internal directories.
Click to hide internal directories.