Skip to content

Conversation

MicahMaphet
Copy link
Contributor

No description provided.

console.log(`Adding fee data to all blocks on ${chain} ${network}`);
let block = await BitcoinBlockStorage.collection.findOne({ chain: chain, network: network, height: 0 });

while (true) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more conventional way would be to do while (block.nextBlockHash)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to find a good way to do that without skipping the last block. I could do while (block).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants