Skip to content

Commit

Permalink
Wait one more block on selectIssuers to deal with light client failures(
Browse files Browse the repository at this point in the history
  • Loading branch information
cmcewen authored and jmrossy committed Dec 18, 2019
1 parent f4a05f0 commit 000553e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/contractkit/src/wrappers/Attestations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class AttestationsWrapper extends BaseWrapper<Attestations> {
// TODO: Use subscription if provider supports
while (Date.now() - startTime < timeoutSeconds * 1000) {
const blockNumber = await this.kit.web3.eth.getBlockNumber()
if (blockNumber >= unselectedRequest.blockNumber + waitBlocks - 1) {
if (blockNumber >= unselectedRequest.blockNumber + waitBlocks) {
return
}
await sleep(pollDurationSeconds * 1000)
Expand Down

0 comments on commit 000553e

Please sign in to comment.