mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Update tx_fetcher.go
This commit is contained in:
parent
b0b2b76509
commit
2eafd6b6e7
1 changed files with 2 additions and 1 deletions
|
|
@ -293,7 +293,8 @@ func (f *TxFetcher) Notify(peer string, types []byte, sizes []uint32, hashes []c
|
|||
// isKnownUnderpriced reports whether a transaction hash was recently found to be underpriced.
|
||||
func (f *TxFetcher) isKnownUnderpriced(hash common.Hash) bool {
|
||||
prevTime, ok := f.underpriced.Peek(hash)
|
||||
if ok && prevTime.Before(time.Now().Add(-maxTxUnderpricedTimeout)) {
|
||||
now := time.Unix(int64(f.clock.Now()/1000000000), 0)
|
||||
if ok && prevTime.Before(now.Add(-maxTxUnderpricedTimeout)) {
|
||||
f.underpriced.Remove(hash)
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue