Skip to content

Commit

Permalink
improve async backing slot
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci committed Apr 25, 2024
1 parent 8319838 commit d6f74f0
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,14 @@ export class SetValidationData implements InherentProvider {
)

const slotIncrease = Math.max(
1,
(meta.consts.timestamp.minimumPeriod as any as BN)
.divn(3000) // relaychain min period
.toNumber(),
1, // min
(meta.consts.timestamp?.minimumPeriod as any as BN) // legacy
?.divn(3000) // relaychain min period
?.toNumber() ||
(meta.consts.aura?.slotDuration as any as BN) // async backing
?.divn(6000) // relaychain block time
?.toNumber() ||
1,
)

for (const key of Object.values(WELL_KNOWN_KEYS)) {
Expand Down

0 comments on commit d6f74f0

Please sign in to comment.