-
Notifications
You must be signed in to change notification settings - Fork 38
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
Preliminary Regtest Guide #51
base: staging
Are you sure you want to change the base?
Conversation
|
||
|
||
```javascript | ||
const FullNode = require('bcoin/lib/node/fullnode'); |
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.
lets make the imports a little more generalized for different setups. In most of the guides we usually forst do const bcoin = require('bcoin')
and then pull the modules from there (e.g. const FullNode = bcoin.fullnode;
etc.) that way, people just need to change one line depending on where their version of bcoin is installed.
persistent: true, | ||
workers: true, | ||
listen: true, | ||
plugins: [require('bcoin/lib/wallet/plugin')] |
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.
Can you pull the wallet plugin import into the same section as the others and assign it a variable.
await block2.refresh(true); | ||
await node.chain.add(block2); | ||
|
||
const nextEntry = await node.chain.getEntryByHeight(node.chain.height); |
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.
When I ran the script I got an error here because chain doesn't have a getEntryByHeight
method. chainDB does though so node.chain.db.getEntryByHeight
should be fine.
Also, it doesn't look like nextEntry
is used anywhere
await node.relay(node.chain.db.state); | ||
|
||
const block2 = await node.miner.mineBlock(); | ||
const tx2 = block2.txs[1]; |
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.
tx2
also doesn't look like it's used anywhere.
await node.miner.addAddress(wdb.primary.getReceive()); | ||
|
||
const tip = node.chain.tip; | ||
const job = await node.miner.createJob(tip); |
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.
is the job
variable used anywhere or can we just leave it as await node.miner.createJob(tip)
without the variable assignment?
Markdown file added, will include updates / more features