Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Fix rounds module init, improved tests #604

Merged
merged 4 commits into from
Jun 12, 2017

Conversation

4miners
Copy link
Contributor

@4miners 4miners commented Jun 9, 2017

  • Fix rounds module init (module is skipped, instead we use function for calc round) for tests
  • Wait for 1 blocks instead of 2 in onNewBlock function
  • Refactored peers.transactions.votes for compatibility with 1 block wait, improved performance

test/node.js Outdated
modulesLoader.initModuleWithDb(Rounds, function (err, rounds) {
if (err) {
return cb(err);
}
var nextRound = rounds.calc(height);
Copy link
Contributor

Choose a reason for hiding this comment

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

Since node.js doesn't implement modules or logic and rounds.calc() is more an helper than a module, maybe instead of overload with module inicialization, we can use the plain function from rounds: Math.ceil(height / slots.delegates)

@4miners 4miners changed the title Fix rounds module init, improved test logging Fix rounds module init, improved tests Jun 10, 2017
Isabello
Isabello previously approved these changes Jun 12, 2017
@karmacoma karmacoma changed the base branch from development to 0.9.0 June 12, 2017 07:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants