@argonprotocol/mainchain 1.1.0-rc.5 → 1.1.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/clis/index.js CHANGED
@@ -642,10 +642,10 @@ var MiningRotations = class {
642
642
  }));
643
643
  this.genesisTick ??= await client.query.ticks.genesisTick().then((x) => x.toNumber());
644
644
  const ticksBetweenSlots = this.miningConfig.ticksBetweenSlots;
645
- const slot1BiddingStartTick = this.genesisTick + this.miningConfig.slotBiddingStartAfterTicks;
646
- if (tick < slot1BiddingStartTick) return 0;
647
- const ticksSinceBiddingStart = tick - slot1BiddingStartTick;
648
- return Math.floor(ticksSinceBiddingStart / ticksBetweenSlots) + 1;
645
+ const slot1StartTick = this.genesisTick + this.miningConfig.slotBiddingStartAfterTicks + ticksBetweenSlots;
646
+ if (tick < slot1StartTick) return 0;
647
+ const ticksSinceSlot1 = tick - slot1StartTick;
648
+ return Math.floor(ticksSinceSlot1 / ticksBetweenSlots);
649
649
  }
650
650
  async getForHeader(client, header) {
651
651
  if (header.number.toNumber() === 0) return 0;