Skip to content

Commit 78411f7

Browse files
authored
fix(GPO): failed to get block receipt during calculating suggest price tip (#1233)
* fix(GPO): failed to get block receipt during calculating suggest priority fee * chore: auto version bump [bot] * change debug level * degrade version * chore: auto version bump [bot] * degrade version
1 parent 49a914f commit 78411f7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

eth/gasprice/scroll_gasprice.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ func (oracle *Oracle) calculateSuggestPriorityFee(ctx context.Context, header *t
4343
// capacity margin
4444
receipts, err := oracle.backend.GetReceipts(ctx, header.Hash())
4545
if receipts == nil || err != nil {
46-
log.Error("failed to get block receipts", "block number", header.Number, "err", err)
46+
log.Debug("failed to get block receipts during calculating suggest priority fee", "block number", header.Number, "err", err)
47+
// If the lastIsCongested is true on the cache, return the lastPrice.
48+
// We believe it's better to err on the side of returning a higher-than-needed suggestion than a lower-than-needed one.
49+
if lastIsCongested {
50+
return lastPrice, lastIsCongested
51+
}
4752
return suggestion, isCongested
4853
}
4954
var maxTxGasUsed uint64

0 commit comments

Comments
 (0)