hsd icon indicating copy to clipboard operation
hsd copied to clipboard

test: abstract some mining heights

Open tynes opened this issue 5 years ago • 5 comments

It is much more useful to mine based on the auction lengths instead of using magic numbers. This allows the parameters to be tweaked and then ran through the test suite because it is possible to choose parameters that do not allow the auctions to work at all. The Network.get call at the top of the file can be altered to select a different network, such as simnet.

tynes avatar Jan 10 '20 21:01 tynes

LGTM!

kilpatty avatar Jan 10 '20 21:01 kilpatty

Good idea mining based on auction stage lengths

turbomaze avatar Jan 10 '20 21:01 turbomaze

Codecov Report

Merging #326 into master will decrease coverage by <.01%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #326      +/-   ##
==========================================
- Coverage   58.68%   58.68%   -0.01%     
==========================================
  Files         129      129              
  Lines       35795    35795              
  Branches     6027     6027              
==========================================
- Hits        21007    21006       -1     
- Misses      14788    14789       +1
Impacted Files Coverage Δ
lib/covenants/rules.js 73.04% <0%> (-0.15%) :arrow_down:
lib/script/script.js 59.32% <0%> (-0.09%) :arrow_down:
lib/utils/binary.js 58.97% <0%> (+2.56%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c554a6f...2a745ab. Read the comment docs.

codecov-io avatar Jan 10 '20 21:01 codecov-io

Note that there are other places in this file that still uses magic numbers, but this was the minimum changes needed to verify that our new simnet params work here https://github.com/handshake-org/hsd/pull/324

tynes avatar Jan 10 '20 21:01 tynes

Concept ACK but I think we should cover all the tests before merge: auction-reorg-test.js I think may be the only other test that needs updates.

Seems to have this in place already: wallet-http-test.js auction-rpc-test.js

pinheadmz avatar Jan 14 '20 15:01 pinheadmz