Skip to content

Commit

Permalink
fix future time
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Dec 15, 2023
1 parent 6372f07 commit c2123c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/bitcore-node/src/modules/ripple/api/csp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ export class RippleStateProvider extends InternalStateProvider implements IChain
if (timeGap > 1000 * 60 * 2) { // if more than a 2 min gap...
nextIdx += Math.floor(timeGap / 10000); // ...jump forward assuming a block every 10 seconds
}
ledger = await this.getDataHostLedger(nextIdx, network);
nextLedger = ledger;
nextLedger = await this.getDataHostLedger(nextIdx, network);
ledger = nextLedger || ledger;
}

// the timeGap above might have overshot
Expand Down Expand Up @@ -336,7 +336,7 @@ export class RippleStateProvider extends InternalStateProvider implements IChain
hash: ledger.ledger_hash,
height: Number(ledger.ledger_index),
previousBlockHash: ledger.parent_hash,
processed: true,
processed: ledger.closed,
time: new Date(ledger.close_time_human),
timeNormalized: new Date(ledger.close_time_human),
reward: 0,
Expand Down

0 comments on commit c2123c0

Please sign in to comment.