Documentation ¶
Index ¶
Constants ¶
View Source
const (
LeafTypeMessage = uint8(1)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClaimTxManager ¶
type ClaimTxManager struct {
// contains filtered or unexported fields
}
ClaimTxManager is the claim transaction manager for L2.
func NewClaimTxManager ¶
func NewClaimTxManager(cfg Config, chExitRootEvent chan *etherman.GlobalExitRoot, l2NodeURL string, l2NetworkID uint, l2BridgeAddr common.Address, bridgeService bridgeServiceInterface, storage interface{}) (*ClaimTxManager, error)
NewClaimTxManager creates a new claim transaction manager.
func (*ClaimTxManager) ReviewMonitoredTx ¶
func (tm *ClaimTxManager) ReviewMonitoredTx(ctx context.Context, mTx *ctmtypes.MonitoredTx) error
ReviewMonitoredTx checks if tx needs to be updated accordingly to the current information stored and the current state of the blockchain
func (*ClaimTxManager) Start ¶
func (tm *ClaimTxManager) Start()
Start will start the tx management, reading txs from storage, send then to the blockchain and keep monitoring them until they get mined
type Config ¶
type Config struct { // FrequencyToMonitorTxs frequency of the resending failed txs FrequencyToMonitorTxs types.Duration `mapstructure:"FrequencyToMonitorTxs"` // PrivateKey defines the key store file that is going // to be read in order to provide the private key to sign the claim txs PrivateKey types.KeystoreFileConfig `mapstructure:"PrivateKey"` }
Config is configuration for L2 claim transaction manager
Click to show internal directories.
Click to hide internal directories.