* 2.10

* Use system.blockHashCount
This commit is contained in:
Jaco Greeff
2020-12-07 11:11:39 +01:00
committed by GitHub
parent 37f49b30de
commit 70f1fa5514
14 changed files with 96 additions and 76 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ export function signingInfo (_instanceId: string, api: ApiInterfaceRx): (address
map(([nonce, header]) => ({
header,
mortalLength: Math.min(
FALLBACK_MAX_HASH_COUNT,
api.consts.system?.blockHashCount?.toNumber() || FALLBACK_MAX_HASH_COUNT,
MORTAL_PERIOD
.div(api.consts.babe?.expectedBlockTime || api.consts.timestamp?.minimumPeriod.muln(2) || FALLBACK_PERIOD)
.iadd(MAX_FINALITY_LAG)