You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The static property GENESIS_BLOCK_NUMBER is 0 in the Policy class
importinit,{Policy}from'@nimiq/core/web'awaitinit()// Nees to wait otherwise Policy is undefinedconstapp=document.querySelector<HTMLDivElement>('#app')!app.innerHTML=` Genesis Block Number is ${Policy.GENESIS_BLOCK_NUMBER}<br/> Slots ${Policy.SLOTS}<br/> Batches per epoch ${Policy.BATCHES_PER_EPOCH}`
Prints the following:
Genesis Block Number is 0
Slots 512
Batches per epoch 720
I guess optimally, the genesis block number would not be part of the policy, since the genesis block can be fed at runtime. The way Policy can currently return the genesis block number is made possible by some late-initialization hacks, which didn't work out here, I guess.
The static property
GENESIS_BLOCK_NUMBER
is 0 in thePolicy
classPrints the following:
Code in the Playground
Using the
getPolicyConstant
method from the RPC, the Genesis block number is3032010
.Am I using the web client incorrectly? Thank you!
The text was updated successfully, but these errors were encountered: