Skip to content

Commit

Permalink
Fix bug where we weren't submitting last state root (#372)
Browse files Browse the repository at this point in the history
* Fix bug where we werent submitting last state root

* Fix lint errror
  • Loading branch information
karlfloersch authored Nov 30, 2020
1 parent 74e36de commit a5972fe
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ export class StateBatchSubmitter extends BatchSubmitter {
// We will submit state roots for txs which have been in the tx chain for a while.
const callBlockNumber: number =
(await this.signer.provider.getBlockNumber()) - this.finalityConfirmations
const totalElements: number = (
await this.ctcContract.getTotalElements()
).toNumber()
const totalElements: number =
(await this.ctcContract.getTotalElements()).toNumber() + BLOCK_OFFSET
const endBlock: number = Math.min(
startBlock + this.maxBatchSize,
totalElements
Expand Down

0 comments on commit a5972fe

Please sign in to comment.