nano-node icon indicating copy to clipboard operation
nano-node copied to clipboard

Remove check for dev network from function nano::election::vote

Open dsiganos opened this issue 1 year ago • 0 comments

Remove check for dev network from function nano::election::vote. The check looks like this: node.network_params.network.is_dev_network ()

The check is there to make it easier to write unit tests. However, we should not be adding unnecessary complexity to already complicated and critical code.

We should create helper function that the unit tests can easily use to build the context they require to do the voting they need.

TODO:

  • remove the dev network check
  • fix the unit tests so that they do not depend on the check existing

dsiganos avatar Feb 13 '23 12:02 dsiganos