Skip to content

Commit 3f86352

Browse files
Merge pull request #553 from skywinder/master
2 parents 0d2db9d + e7c98db commit 3f86352

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Sources/web3swift/Web3/Web3+GasOracle.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ extension Web3 {
128128
case let .exact(number): latestBlockNumber = number
129129
}
130130

131-
guard latestBlockNumber != 0 else { return [] }
131+
/// 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 [] }
132135

133136
// TODO: Make me work with cache
134137
let lastNthBlockGasPrice = try (latestBlockNumber - blockCount ... latestBlockNumber)

web3swift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'web3swift'
3-
spec.version = '2.6.2'
3+
spec.version = '2.6.3'
44
spec.ios.deployment_target = "9.0"
55
spec.osx.deployment_target = "10.12"
66
spec.license = { :type => 'Apache License 2.0', :file => 'LICENSE.md' }

0 commit comments

Comments
 (0)