Commit graph

4 commits

Author SHA1 Message Date
Dave Collins
d58ea754f3 Add test and infrastructure for block scripts.
This commit adds a test for checking known good block scripts in a block
are valid.  As a part of this, it adds the infastructure needed to load a
saved transaction store from a file which contains all of the input
transactions needed.

It also contains some changes from running goimports as well as some other
cleanup.
2015-01-08 05:10:54 -06:00
Dave Collins
6af9302374 More false positive prevention in new time tests.
This commit extends the same logic in the previous commit to the
comparison of offsets returned from the median time source in the tests.

In particular it modifies the tests to allow for the offsets to differ by
a second due to a boundary condition to prevent false positives.
2014-10-11 18:06:41 -05:00
Dave Collins
b4c55aee28 Update new time tests to prevent false positives.
The new median time tests perform a comparsion of the adjusted time
returned from the median time source to the expected value.  However,
since time is always moving, it is possible the current time between the
call to the adjusted time function and the current time taken in the tests
for comparison just after the call differ by a second due to a boundary
condition.  So, this commit modifies the tests to allow for this
condition.
2014-10-11 14:53:27 -05:00
Dave Collins
208d4d79d7 Add 100% test coverage for new median time code. 2014-10-10 01:23:39 -05:00