diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-05-29 16:42:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-29 16:42:48 +0800 |
commit | dd06c8584368316c8fb388384b0723d8c7e543f0 (patch) | |
tree | 6b0daa3ff79df3bf6405237dbee4cbceacb0c4d0 /core/tx_list.go | |
parent | ae40d51410f6fa958d08cd34f9e8586edb88fdf1 (diff) | |
parent | 08959bbc70ade02109c819fdee72be1ed9310726 (diff) | |
download | go-tangerine-dd06c8584368316c8fb388384b0723d8c7e543f0.tar go-tangerine-dd06c8584368316c8fb388384b0723d8c7e543f0.tar.gz go-tangerine-dd06c8584368316c8fb388384b0723d8c7e543f0.tar.bz2 go-tangerine-dd06c8584368316c8fb388384b0723d8c7e543f0.tar.lz go-tangerine-dd06c8584368316c8fb388384b0723d8c7e543f0.tar.xz go-tangerine-dd06c8584368316c8fb388384b0723d8c7e543f0.tar.zst go-tangerine-dd06c8584368316c8fb388384b0723d8c7e543f0.zip |
Merge pull request #14523 from karalabe/txpool-cli-flags
cmd, core, eth: configurable txpool parameters
Diffstat (limited to 'core/tx_list.go')
-rw-r--r-- | core/tx_list.go | 4 |
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 } |