Commit graph

12 commits

Author SHA1 Message Date
Dave Collins
22c91fa80a Update for recent chainhash-related API changes. (#78)
This updates all code in the main package and subpackages to make use of
the new chainhash package since the old wire.ShaHash type and functions
have been removed in favor of the abstracted package.

Also, since this required API changes anyways and the hash algorithm is
no longer tied specifically to SHA, all other functions throughout the
code base which had "Sha" in their name have been changed to Hash so
they are not incorrectly implying the hash algorithm.

The following is an overview of the changes:

- Update all references to wire.ShaHash to the new chainhash.Hash type
- Rename the following functions and update all references:
  - Block.Sha -> Hash
  - Block.TxSha -> TxHash
  - Tx.Sha -> Hash
  - bloom.Filter.AddShaHash -> AddHash
- Rename all variables that included sha in their name to include hash
  instead
- Add license headers to coinset package files
2016-08-08 12:38:16 -05:00
Dave Collins
1b73e9828d Relicense to the btcsuite developers. 2015-05-01 12:41:58 -05:00
Dave Collins
499e9e0daa Update btcec path import paths to new location. 2015-02-06 10:35:18 -06:00
Dave Collins
1324fa1fad Update btcnet path import paths to new location. 2015-02-05 23:30:03 -06:00
Dave Collins
80b97479bd Update btcwire path import paths to new location. 2015-02-05 14:48:38 -06:00
Dave Collins
9e2037d6db Update btcec import paths to new location. 2015-01-16 18:04:23 -06:00
Dave Collins
7ac9b42a52 Update btcnet import paths to new location. 2015-01-16 17:36:18 -06:00
Dave Collins
fdc00f8eff Update btcwire import paths to new location. 2015-01-16 15:26:50 -06:00
Dave Collins
506d333934 Update btcutil import paths to new location. 2015-01-15 15:13:38 -06:00
benma
07db1b5a70 Integrate the new base58 package. 2014-12-22 12:01:50 +01:00
Josh Rickmar
5bcc7790a0 Update Address and WIF APIs to use btcnet.
This change removes all occurances of btcwire.BitcoinNet from exported
APIs, replacing each with *btcnet.Params.  This simplifies the logic
for verifying string encodings of addresses and WIF private keys which
use leading identifier numbers to differentiate between address types
and the network they are intended for.  It also allows the use of this
package for non-standard networks (not mainnet, regtest, or testnet3)
and future proofs it for the possible addition of future testnet
networks.

To update across this change, replace each btcwire.BitcoinNet
parameter with the associated *btcnet.Params.  For the standard
networks, these changes are:

  btcwire.MainNet  -> &btcnet.MainNetParams
  btcwire.TestNet  -> &btcnet.RegressionNetParams
  btcwire.TestNet3 -> &btcnet.TestNet3Params

ok @davecgh
2014-05-27 17:08:45 -05:00
Josh Rickmar
bff18e5a93 Introduce better WIF API.
The old functions DecodePrivateKey and EncodePrivateKey have been
removed in favor of the DecodeWIF function and the String method of
the new WIF type.

ok @davecgh
2014-05-21 17:49:37 -05:00