Commit graph

19 commits

Author SHA1 Message Date
Dave Collins 4dd7c939ed Update btcwire path import paths to new location. 2015-02-05 12:58:30 -06:00
Dave Collins 612ff7f813 Update btcchain import paths to new location. 2015-01-30 16:04:26 -06:00
Dave Collins 578e615994 Update btcwire import paths to new location. 2015-01-16 15:05:40 -06:00
Dave Collins 3bbe8ff0ca Add checkpoint at block height 319400. 2014-09-18 19:04:01 -05:00
Dave Collins 0932dfeb12 WIP coin type 2014-08-12 10:37:58 -05:00
Dave Collins 0994bcf4b2 Add priv and public key bytes for HD wallet keys.
This commit introduces an HDPrivateKeyID and HDPublicKeyID field to the
params struct which are used by hierarchical deterministic extended keys
as defined by BIP0032.

In addition, a new function named HDPrivateKeyToPublicKeyID has been added
to allow the caller to get the associated public key ID given a private
key ID.

The tests have also been updated to maintain 100% test coverage.

ok @jrick
2014-07-19 03:19:19 -05:00
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 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 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