Skip to content

Commit

Permalink
fix(deps): bump ar.io/sdk to add retries to contract get requests, up…
Browse files Browse the repository at this point in the history
…date logs
  • Loading branch information
dtfiedler committed Jun 14, 2024
1 parent f4b2b2b commit f45965d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/ar-io/ar-io-observer"
},
"dependencies": {
"@ar.io/sdk": "1.2.0-alpha.2",
"@ar.io/sdk": "1.2.0-alpha.3",
"@ardrive/ardrive-promise-cache": "^1.1.4",
"@ardrive/turbo-sdk": "^1.0.1",
"ajv": "^8.12.0",
Expand Down
19 changes: 9 additions & 10 deletions src/epochs/contract-epoch-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,21 @@ export class ContractEpochSource implements IEpochTimestampSource {
) {
return this.epochParams;
}
const { startTimestamp, startHeight, endTimestamp, epochIndex } =
await this.contract.getCurrentEpoch();
const { startTimestamp, startHeight, endTimestamp, epochIndex } = await this.contract.getCurrentEpoch();

Check failure on line 61 in src/epochs/contract-epoch-source.ts

View workflow job for this annotation

GitHub Actions / build (lint:check)

Insert `⏎·····`

// log the epoch params for debugging
this.log.info('Fetched epoch params', {
startTimestamp,
startHeight,
endTimestamp,
epochIndex,
});
// TODO: handle if this call fails, either throw error or use defaults

this.log.info('Updating epoch params.', {
startTimestamp: startTimestamp,
startHeight: startHeight,
endTimestamp: endTimestamp,
epochIndex: epochIndex,
});
this.epochParams = {
epochStartTimestamp: startTimestamp,
epochStartHeight: startHeight,
epochEndTimestamp: endTimestamp,
epochIndex,
epochIndex: epochIndex,
};
return this.epochParams;
}
Expand Down
1 change: 1 addition & 0 deletions src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ export async function updateAndSaveCurrentReport() {
currentHeight,
saveAfterTimestamp,
currentBlockTimestamp,
epochIndex: report.epochIndex,
});
} else {
reportSink.saveReport({ report });
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
call-me-maybe "^1.0.1"
js-yaml "^4.1.0"

"@ar.io/sdk@1.2.0-alpha.2":
version "1.2.0-alpha.2"
resolved "https://registry.yarnpkg.com/@ar.io/sdk/-/sdk-1.2.0-alpha.2.tgz#5a9c94ee1574d7868dae008be218e492ec6d4dc2"
integrity sha512-9qyMXXFJAYZ8bVIQpH43aLVyXNwn47Qpk0roSPsJ6LBkjOuDZUeiEQoEnPkdhJZciWiKcvPJC9D3Zs0jExxn+g==
"@ar.io/sdk@1.2.0-alpha.3":
version "1.2.0-alpha.3"
resolved "https://registry.yarnpkg.com/@ar.io/sdk/-/sdk-1.2.0-alpha.3.tgz#0e7f84b6f2c1f17fbcae763107447d564f44006d"
integrity sha512-NOvvbruWadd+kmCLcSUocfKccnkQ0dVrIgbVSa/NcbzX525RcuHDZKg26Ais5j6N06d4QdUk80rOP2aqWiqfNA==
dependencies:
"@permaweb/aoconnect" "^0.0.55"
arbundles "0.11.0"
Expand Down

0 comments on commit f45965d

Please sign in to comment.