mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Delete pending txs by external mark, store tx IP
- In tx_pool, add a column called `external_delete` that can be set to true externally. Regularly, the coordinator will delete all pending txs with this column set to true. The interval for this action is set via the new config parameter `Coordinator.PurgeByExtDelInterval`. - In tx_pool, add a column for the client ip that sent the transaction. The api fills this value using the ClientIP method from gin.Context, which should work even under a reverse-proxy.
This commit is contained in:
@@ -303,6 +303,7 @@ func NewNode(mode Mode, cfg *config.Node) (*Node, error) {
|
||||
ForgeDelay: cfg.Coordinator.ForgeDelay.Duration,
|
||||
ForgeNoTxsDelay: cfg.Coordinator.ForgeNoTxsDelay.Duration,
|
||||
SyncRetryInterval: cfg.Coordinator.SyncRetryInterval.Duration,
|
||||
PurgeByExtDelInterval: cfg.Coordinator.PurgeByExtDelInterval.Duration,
|
||||
EthClientAttempts: cfg.Coordinator.EthClient.Attempts,
|
||||
EthClientAttemptsDelay: cfg.Coordinator.EthClient.AttemptsDelay.Duration,
|
||||
EthNoReuseNonce: cfg.Coordinator.EthClient.NoReuseNonce,
|
||||
|
||||
Reference in New Issue
Block a user