mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-06 19:06:42 +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:
@@ -91,6 +91,10 @@ type Coordinator struct {
|
||||
// SyncRetryInterval is the waiting interval between calls to the main
|
||||
// handler of a synced block after an error
|
||||
SyncRetryInterval Duration `validate:"required"`
|
||||
// PurgeByExtDelInterval is the waiting interval between calls
|
||||
// to the PurgeByExternalDelete function of the l2db which deletes
|
||||
// pending txs externally marked by the column `external_delete`
|
||||
PurgeByExtDelInterval Duration `validate:"required"`
|
||||
// L2DB is the DB that holds the pool of L2Txs
|
||||
L2DB struct {
|
||||
// SafetyPeriod is the number of batches after which
|
||||
|
||||
Reference in New Issue
Block a user