diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-07-28 21:09:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-28 21:09:39 +0800 |
commit | 3d32690b54539d13ec8e7884bf3416ada6046354 (patch) | |
tree | e3d1f6abae6dd3336f02799934a2e5879500195c /cmd/utils | |
parent | a602ee90f2c28eadbca8cdc2e143825a4c24ab23 (diff) | |
download | go-tangerine-3d32690b54539d13ec8e7884bf3416ada6046354.tar go-tangerine-3d32690b54539d13ec8e7884bf3416ada6046354.tar.gz go-tangerine-3d32690b54539d13ec8e7884bf3416ada6046354.tar.bz2 go-tangerine-3d32690b54539d13ec8e7884bf3416ada6046354.tar.lz go-tangerine-3d32690b54539d13ec8e7884bf3416ada6046354.tar.xz go-tangerine-3d32690b54539d13ec8e7884bf3416ada6046354.tar.zst go-tangerine-3d32690b54539d13ec8e7884bf3416ada6046354.zip |
cmd, core, eth: journal local transactions to disk (#14784)
* core: reduce txpool event loop goroutines and sync structs
* cmd, core, eth: journal local transactions to disk
* core: journal replacement pending transactions too
* core: separate transaction journal from pool
Diffstat (limited to 'cmd/utils')
-rw-r--r-- | cmd/utils/flags.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 0159364af..9f7b76c12 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -213,6 +213,16 @@ var ( Name: "txpool.nolocals", Usage: "Disables price exemptions for locally submitted transactions", } + TxPoolJournalFlag = cli.StringFlag{ + Name: "txpool.journal", + Usage: "Disk journal for local transaction to survive node restarts", + Value: core.DefaultTxPoolConfig.Journal, + } + TxPoolRejournalFlag = cli.DurationFlag{ + Name: "txpool.rejournal", + Usage: "Time interval to regenerate the local transaction journal", + Value: core.DefaultTxPoolConfig.Rejournal, + } TxPoolPriceLimitFlag = cli.Uint64Flag{ Name: "txpool.pricelimit", Usage: "Minimum gas price limit to enforce for acceptance into the pool", @@ -838,6 +848,12 @@ func setTxPool(ctx *cli.Context, cfg *core.TxPoolConfig) { if ctx.GlobalIsSet(TxPoolNoLocalsFlag.Name) { cfg.NoLocals = ctx.GlobalBool(TxPoolNoLocalsFlag.Name) } + if ctx.GlobalIsSet(TxPoolJournalFlag.Name) { + cfg.Journal = ctx.GlobalString(TxPoolJournalFlag.Name) + } + if ctx.GlobalIsSet(TxPoolRejournalFlag.Name) { + cfg.Rejournal = ctx.GlobalDuration(TxPoolRejournalFlag.Name) + } if ctx.GlobalIsSet(TxPoolPriceLimitFlag.Name) { cfg.PriceLimit = ctx.GlobalUint64(TxPoolPriceLimitFlag.Name) } |