-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added network:head command to dump some useful info #2463
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be great to clean this up and get it merged
let interesting: { [key: string]: string | number | boolean } = {} | ||
interesting['timestamp'] = new Date(new Date(0).setUTCSeconds(block.timestamp)).toUTCString() | ||
interesting['block number'] = block.number | ||
interesting['epoch index'] = Math.floor(block.number / 720) // TODO: epoch block duration should come from network:parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can get this from this.kit
see how network/parameters.ts
works
|
||
async run() { | ||
const block = await this.web3.eth.getBlock('latest') | ||
console.log(block.miner) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
Is this still a relevant PR or should this be closed? |
Description
Added network:head command to dump some useful info
Sample output:
Tested
Ran against baklava network by building against the baklava branch on the following environment: