aboutsummaryrefslogtreecommitdiffstats
path: root/core/tx_list.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-26 18:40:47 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-05-29 16:29:46 +0800
commit08959bbc70ade02109c819fdee72be1ed9310726 (patch)
treecfa633babd7910a5b081b5f89f0d25dc80a02add /core/tx_list.go
parentdd5ed01f3b5ff5e426c9e2e4a55a8b05b10bc78d (diff)
downloaddexon-08959bbc70ade02109c819fdee72be1ed9310726.tar
dexon-08959bbc70ade02109c819fdee72be1ed9310726.tar.gz
dexon-08959bbc70ade02109c819fdee72be1ed9310726.tar.bz2
dexon-08959bbc70ade02109c819fdee72be1ed9310726.tar.lz
dexon-08959bbc70ade02109c819fdee72be1ed9310726.tar.xz
dexon-08959bbc70ade02109c819fdee72be1ed9310726.tar.zst
dexon-08959bbc70ade02109c819fdee72be1ed9310726.zip
cmd, core, eth: configurable txpool parameters
Diffstat (limited to 'core/tx_list.go')
-rw-r--r--core/tx_list.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/tx_list.go b/core/tx_list.go
index eb380da0b..08d7d80e8 100644
--- a/core/tx_list.go
+++ b/core/tx_list.go
@@ -246,11 +246,11 @@ func (l *txList) Overlaps(tx *types.Transaction) bool {
//
// If the new transaction is accepted into the list, the lists' cost threshold
// is also potentially updated.
-func (l *txList) Add(tx *types.Transaction) (bool, *types.Transaction) {
+func (l *txList) Add(tx *types.Transaction, priceBump uint64) (bool, *types.Transaction) {
// If there's an older better transaction, abort
old := l.txs.Get(tx.Nonce())
if old != nil {
- threshold := new(big.Int).Div(new(big.Int).Mul(old.GasPrice(), big.NewInt(100+minPriceBumpPercent)), big.NewInt(100))
+ threshold := new(big.Int).Div(new(big.Int).Mul(old.GasPrice(), big.NewInt(100+int64(priceBump))), big.NewInt(100))
if threshold.Cmp(tx.GasPrice()) >= 0 {
return false, nil
}