We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f243603 + 5a45c22 commit 1478a37Copy full SHA for 1478a37
Sources/web3swift/Web3/Web3+GasOracle.swift
@@ -128,7 +128,10 @@ extension Web3 {
128
case let .exact(number): latestBlockNumber = number
129
}
130
131
- guard latestBlockNumber != 0 else { return [] }
+ /// checking if latest block number is greather than number of blocks to take in account
132
+ /// we're ignoring case when `latestBlockNumber` == `blockCount` since it's unlikely case
133
+ /// which we could neglect
134
+ guard latestBlockNumber > blockCount else { return [] }
135
136
// TODO: Make me work with cache
137
let lastNthBlockGasPrice = try (latestBlockNumber - blockCount ... latestBlockNumber)
0 commit comments