Skip to content

Commit 5c27b45

Browse files
committed
Updated dist files.
1 parent 20f6e16 commit 5c27b45

15 files changed

+95
-59
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Changelog
33

44
This change log is managed by `admin/cmds/update-versions` but may be manually updated.
55

6-
ethers/v5.0.26 (2021-01-13 03:38)
6+
ethers/v5.0.26 (2021-01-13 14:47)
77
---------------------------------
88

9-
- Fixed abundant UnhandledRejectErrors in provider polling. ([#1084](https://github.com/ethers-io/ethers.js/issues/1084), [#1208](https://github.com/ethers-io/ethers.js/issues/1208), [#1221](https://github.com/ethers-io/ethers.js/issues/1221), [#1235](https://github.com/ethers-io/ethers.js/issues/1235); [74470de](https://github.com/ethers-io/ethers.js/commit/74470defda5170338735bbbe676c207cdd5cc1cf))
9+
- Fixed abundant UnhandledRejectErrors in provider polling. ([#1084](https://github.com/ethers-io/ethers.js/issues/1084), [#1208](https://github.com/ethers-io/ethers.js/issues/1208), [#1221](https://github.com/ethers-io/ethers.js/issues/1221), [#1235](https://github.com/ethers-io/ethers.js/issues/1235); [74470de](https://github.com/ethers-io/ethers.js/commit/74470defda5170338735bbbe676c207cdd5cc1cf), [20f6e16](https://github.com/ethers-io/ethers.js/commit/20f6e16394909a43498c1ac6c73152957bd121bd))
1010
- Fixed non-checksum address comparisons in abstract Signer. ([#1236](https://github.com/ethers-io/ethers.js/issues/1236); [8175c83](https://github.com/ethers-io/ethers.js/commit/8175c83026436b6335800780ca12b7257e1b490f))
1111

1212
ethers/v5.0.25 (2021-01-08 03:31)
@@ -212,4 +212,4 @@ ethers/v5.0.0 (2020-06-12 19:58)
212212
--------------------------------
213213

214214
- Preserve config canary string. ([7157816](https://github.com/ethers-io/ethers.js/commit/7157816fa53f660d750811b293e3b1d5a2f70bd4))
215-
- Updated docs. ([9e4c7e6](https://github.com/ethers-io/ethers.js/commit/9e4c7e609d9eeb5f2a11d6a90bfa9d32ee696431))
215+
- Updated docs. ([9e4c7e6](https://github.com/ethers-io/ethers.js/commit/9e4c7e609d9eeb5f2a11d6a90bfa9d32ee696431))

packages/ethers/dist/ethers.esm.js

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18470,20 +18470,30 @@ class BaseProvider extends Provider {
1847018470
_getInternalBlockNumber(maxAge) {
1847118471
return __awaiter$8(this, void 0, void 0, function* () {
1847218472
yield this._ready();
18473-
const internalBlockNumber = this._internalBlockNumber;
18474-
if (maxAge > 0 && internalBlockNumber) {
18475-
try {
18476-
const result = yield internalBlockNumber;
18477-
if ((getTime() - result.respTime) <= maxAge) {
18478-
return result.blockNumber;
18473+
// Allowing stale data up to maxAge old
18474+
if (maxAge > 0) {
18475+
// While there are pending internal block requests...
18476+
while (this._internalBlockNumber) {
18477+
// ..."remember" which fetch we started with
18478+
const internalBlockNumber = this._internalBlockNumber;
18479+
try {
18480+
// Check the result is not too stale
18481+
const result = yield internalBlockNumber;
18482+
if ((getTime() - result.respTime) <= maxAge) {
18483+
return result.blockNumber;
18484+
}
18485+
// Too old; fetch a new value
18486+
break;
1847918487
}
18480-
}
18481-
catch (error) {
18482-
// Don't null the dead (rejected) fetch, if it has already been updated
18483-
if (this._internalBlockNumber === internalBlockNumber) {
18484-
this._internalBlockNumber = null;
18488+
catch (error) {
18489+
// The fetch rejected; if we are the first to get the
18490+
// rejection, drop through so we replace it with a new
18491+
// fetch; all others blocked will then get that fetch
18492+
// which won't match the one they "remembered" and loop
18493+
if (this._internalBlockNumber === internalBlockNumber) {
18494+
break;
18495+
}
1848518496
}
18486-
throw error;
1848718497
}
1848818498
}
1848918499
const reqTime = getTime();

packages/ethers/dist/ethers.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.esm.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.esm.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.umd.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20699,26 +20699,34 @@
2069920699
case 0: return [4 /*yield*/, this._ready()];
2070020700
case 1:
2070120701
_a.sent();
20702-
internalBlockNumber = this._internalBlockNumber;
20703-
if (!(maxAge > 0 && internalBlockNumber)) return [3 /*break*/, 5];
20702+
if (!(maxAge > 0)) return [3 /*break*/, 7];
2070420703
_a.label = 2;
2070520704
case 2:
20706-
_a.trys.push([2, 4, , 5]);
20707-
return [4 /*yield*/, internalBlockNumber];
20705+
if (!this._internalBlockNumber) return [3 /*break*/, 7];
20706+
internalBlockNumber = this._internalBlockNumber;
20707+
_a.label = 3;
2070820708
case 3:
20709+
_a.trys.push([3, 5, , 6]);
20710+
return [4 /*yield*/, internalBlockNumber];
20711+
case 4:
2070920712
result = _a.sent();
2071020713
if ((getTime() - result.respTime) <= maxAge) {
2071120714
return [2 /*return*/, result.blockNumber];
2071220715
}
20713-
return [3 /*break*/, 5];
20714-
case 4:
20716+
// Too old; fetch a new value
20717+
return [3 /*break*/, 7];
20718+
case 5:
2071520719
error_2 = _a.sent();
20716-
// Don't null the dead (rejected) fetch, if it has already been updated
20720+
// The fetch rejected; if we are the first to get the
20721+
// rejection, drop through so we replace it with a new
20722+
// fetch; all others blocked will then get that fetch
20723+
// which won't match the one they "remembered" and loop
2071720724
if (this._internalBlockNumber === internalBlockNumber) {
20718-
this._internalBlockNumber = null;
20725+
return [3 /*break*/, 7];
2071920726
}
20720-
throw error_2;
20721-
case 5:
20727+
return [3 /*break*/, 6];
20728+
case 6: return [3 /*break*/, 2];
20729+
case 7:
2072220730
reqTime = getTime();
2072320731
checkInternalBlockNumber = lib$3.resolveProperties({
2072420732
blockNumber: this.perform("getBlockNumber", {}),
@@ -20750,7 +20758,7 @@
2075020758
}
2075120759
});
2075220760
return [4 /*yield*/, checkInternalBlockNumber];
20753-
case 6: return [2 /*return*/, (_a.sent()).blockNumber];
20761+
case 8: return [2 /*return*/, (_a.sent()).blockNumber];
2075420762
}
2075520763
});
2075620764
});

packages/ethers/dist/ethers.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/dist/ethers.umd.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/ethers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"test": "echo \"Error: no test specified\" && exit 1"
6363
},
6464
"sideEffects": false,
65-
"tarballHash": "0xbf1ac1f27016ee0adf01f398bda537589e9cd6c793520deadf3945014d759c3c",
65+
"tarballHash": "0xb1c5e01e009427c3c17b0c045899c847414ae6085811aab984466722ce440dbf",
6666
"types": "./lib/index.d.ts",
6767
"version": "5.0.26"
6868
}

0 commit comments

Comments
 (0)