Commit graph

13 commits

Author SHA1 Message Date
Dave Collins
b69a849114 Import btcchain repo into blockchain directory.
This commit contains the entire btcchain repository along with several
changes needed to move all of the files into the blockchain directory in
order to prepare it for merging.  This does NOT update btcd or any of the
other packages to use the new location as that will be done separately.

- All import paths in the old btcchain test files have been changed to
  the new location
- All references to btcchain as the package name have been changed to
  blockchain
2015-01-30 15:49:59 -06:00
Dave Collins
dd512e7315 Update database import paths to new location. 2015-01-27 15:00:49 -06:00
Dave Collins
3951e75a3f Update btcchain import paths to new location. 2015-01-16 18:40:47 -06:00
Dave Collins
14056ad2ca Update btcdb import paths to new location. 2015-01-16 18:29:19 -06:00
Dave Collins
9bb251f530 Update btcnet import paths to new location. 2015-01-16 17:28:19 -06:00
Dave Collins
ee945cdeec Update btcutil import paths to new location. 2015-01-15 10:23:47 -06:00
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
df065eee19 Provide a new median time source API.
This commit provides a new interface, MedianTimeSource, along with a
concrete implementation which allows improved accuracy of time by making
use of the median network time as calculated from multiple time samples.

The time samples are to be provided by callers and are intended to come
from remote clients.

The calculations performed in this implementation exactly mirror those in
Bitcoin Core because time calculations are part of the consensus rules and
hence need to match exactly.
2014-10-10 01:12:39 -05:00
David Hill
c3abafc7eb Println -> Printf when using formatting directives.
This makes go vet happy.
2014-08-28 10:23:46 -04:00
Dave Collins
01fa7fa069 Add BigToCompact example. 2014-07-08 07:57:22 -05:00
Dave Collins
1a2baa3099 Add CompactToBig example. 2014-07-08 02:15:41 -05:00
Dave Collins
62c14b7001 Name new example so it shows up properly on godoc. 2014-07-08 01:49:48 -05:00
Dave Collins
94845326b5 Use testable example and update doc.go README.md.
This commit moves the ProcessBlock example to a test file so it integrates
nicely with Go's example tooling.

This allows the example output to be tested as a part of running the
normal Go tests to help ensure it doesn't get out of date with the code.
It is also nice to have the example in one place rather than repeating it
in doc.go and README.md.

Links and information about the example have been incldued in doc.go and
README.md in place of the example.
2014-07-08 01:45:28 -05:00