mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 05:36:46 +00:00
fix(GPO): failed to get block receipt during calculating suggest priority fee
This commit is contained in:
parent
49a914fc2a
commit
49c830f621
1 changed files with 6 additions and 1 deletions
|
|
@ -43,7 +43,12 @@ func (oracle *Oracle) calculateSuggestPriorityFee(ctx context.Context, header *t
|
|||
// capacity margin
|
||||
receipts, err := oracle.backend.GetReceipts(ctx, header.Hash())
|
||||
if receipts == nil || err != nil {
|
||||
log.Error("failed to get block receipts", "block number", header.Number, "err", err)
|
||||
log.Error("failed to get block receipts during calculating suggest priority fee", "block number", header.Number, "err", err)
|
||||
// If the lastIsCongested is true on the cache, return the lastPrice.
|
||||
// We believe it's better to err on the side of returning a higher-than-needed suggestion than a lower-than-needed one.
|
||||
if lastIsCongested {
|
||||
return lastPrice, lastIsCongested
|
||||
}
|
||||
return suggestion, isCongested
|
||||
}
|
||||
var maxTxGasUsed uint64
|
||||
|
|
|
|||
Loading…
Reference in a new issue