Commit Graph

17 Commits

Author SHA1 Message Date
Josh Rickmar
4bbcede9e0 Add tests for network registration.
While here, fix a bug found through testing.  Register will now return
ErrDuplicateNet if the caller attempts to register any of the standard
network parameters provided by this package.

ok @davecgh
2014-06-13 09:49:02 -05:00
Dave Collins
41dce5796d Update to coveralls.io for test coverage reporting.
Also add a test coverage badge to the README.md.
2014-06-12 18:44:34 -05:00
Dave Collins
acda2044a0 Add godoc reference badge to README.md. 2014-06-12 18:40:44 -05:00
Dave Collins
3cbba55822 Add support for TravisCI.
Also add TravisCI build status badge to README.md.
2014-06-12 18:37:35 -05:00
Dave Collins
0f23236f43 Make subsidy halving interval for simnet 210000.
This value matches testnet and mainnet and makes more sense because it
allows way more coins to be generated which is useful during simulation
testing.

NOTE: this will invalidate existing simnet chains, but since they
are only intended to be short lived for the duration of a simulation test,
this is a non-issue.
2014-06-12 18:20:51 -05:00
Dave Collins
c71988f668 Add comments for prefixes the encoding IDs map to. 2014-06-12 18:14:46 -05:00
GeertJohan
a3091847b3 Fix adding wrong HashAddrID to pubKeyHashAddrIDs 2014-06-13 01:00:59 +02:00
Dave Collins
dc967b7cc8 Add params for new simulation testing network.
ok @jrick
2014-05-29 15:22:00 -05:00
Dave Collins
218f8df5ba Add a default net port parameter to each network.
ok @jrick
2014-05-29 12:45:44 -05:00
Dave Collins
01799eeff1 Define genesis blocks internally.
The genesis block for each network is a parameter for the network.  As
such, it makes more sense to define them in this package instead of in the
wire protocol package.

ok @jrick
2014-05-28 09:08:20 -05:00
Josh Rickmar
6b3e878cd9 Add ISC license.
Spotted by @davecgh.
2014-05-28 00:15:11 -05:00
Josh Rickmar
81c37e551f Fix documentation code examples.
The examples uses a btcutil API that was recently updated from passing
btcwire.BitcoinNet to *btcnet.Params.  This change updates the btcutil
call in the examples, as well as modifying the example in the README
to match that in doc.go (where errors were handled slightly
differently).
2014-05-27 20:41:30 -05:00
Josh Rickmar
18794e4cfc Fix errors after deciding on the Register API.
The ParamsForNet function was removed, so likewise this change removes
ErrUnknownNet error that it used to return.

As network registration is now necessary for correct handling of
alternate network encoding magics, and therefore the ErrDuplicateNet
error returned by Register is here to stay, kill the comment about the
error being removed later.
2014-05-27 20:35:35 -05:00
Josh Rickmar
6f76171a82 Additions for btcutil.
ok @davecgh
2014-05-27 17:39:09 -05:00
Dave Collins
fb8ab4200f Add more chain-related fields and checkpoints.
This commit adds more chain-related fields to the parameters as a part of
converting btcchain to work with btcnet parameters instead of coding the
network-specific knowledge into the package itself.

It also moves the checkpoints from btcchain since checkpoints are a
network parameter and make more sense here.

ok @jrick
2014-05-27 10:07:19 -05:00
Josh Rickmar
536c1e3c29 Add parameters used by btcd.
This change adds two parameters to the Params struct which are used by
btcd to alter behavior based on the active network, rather than
hardcoding checks for a particular network.

The first, ResetMinDifficulty, specifies whether the target difficulty
can change between the retarget intervals.

The second, RelayNonStdTxs, specifies whether standard transaction
checks should not be performed when accepting mempool transactions.

The zero values (false) for both of these bools are the correct
parameter values for mainnet.

While here, rename the test network version 3 to "testnet3", as both
btcd and btcwallet will include additional handling to rename this to
"testnet" for directory names, and a switch to "testnet3" is planned
in the future.
2014-05-23 00:55:21 -05:00
Josh Rickmar
55ef07ca61 Initial commit. 2014-05-22 13:08:32 -05:00