hsd
hsd copied to clipboard
test: abstract some mining heights
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.
LGTM!
Good idea mining based on auction stage lengths
Codecov Report
Merging #326 into master will decrease coverage by
<.01%
. The diff coverage isn/a
.
@@ 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.
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
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