Correct a few comments for available nets.

Originally the various NewAddressX family on functions were limited to
only btcwire.MainNet and btcwire.TestNet3.  They were changed a while back
to also support the regression test network however the comments were not
updated.  This commit simply removes the comments which limited the
available choices since all btcwire.BitconNet types are now supported.
This commit is contained in:
Dave Collins 2014-03-28 19:29:30 -05:00
parent 560355ff92
commit 050373543d

View file

@ -188,7 +188,7 @@ type AddressPubKeyHash struct {
}
// NewAddressPubKeyHash returns a new AddressPubKeyHash. pkHash must
// be 20 bytes and net must be btcwire.MainNet or btcwire.TestNet3.
// be 20 bytes.
func NewAddressPubKeyHash(pkHash []byte, net btcwire.BitcoinNet) (*AddressPubKeyHash, error) {
// Check for a valid pubkey hash length.
if len(pkHash) != ripemd160.Size {
@ -270,7 +270,7 @@ func NewAddressScriptHash(serializedScript []byte, net btcwire.BitcoinNet) (*Add
}
// NewAddressScriptHashFromHash returns a new AddressScriptHash. scriptHash
// must be 20 bytes and net must be btcwire.MainNet or btcwire.TestNet3.
// must be 20 bytes.
func NewAddressScriptHashFromHash(scriptHash []byte, net btcwire.BitcoinNet) (*AddressScriptHash, error) {
// Check for a valid script hash length.
if len(scriptHash) != ripemd160.Size {
@ -360,8 +360,7 @@ type AddressPubKey struct {
// NewAddressPubKey returns a new AddressPubKey which represents a pay-to-pubkey
// address. The serializedPubKey parameter must be a valid pubkey and can be
// uncompressed, compressed, or hybrid. The net parameter must be
// btcwire.MainNet or btcwire.TestNet3.
// uncompressed, compressed, or hybrid.
func NewAddressPubKey(serializedPubKey []byte, net btcwire.BitcoinNet) (*AddressPubKey, error) {
pubKey, err := btcec.ParsePubKey(serializedPubKey, btcec.S256())
if err != nil {