Skip to content

Commit

Permalink
improve async backing slot (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Apr 25, 2024
1 parent 8319838 commit 743415d
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 743415d

Please sign in to comment.