Add several comments for exported constants.

This commit is contained in:
Dave Collins 2013-07-27 16:31:47 -05:00
parent d6752d8f99
commit 035a9c3dc3
2 changed files with 20 additions and 5 deletions

View file

@ -10,11 +10,21 @@ import (
)
const (
MainPort = "8333"
TestNetPort = "18333"
RegressionTestPort = "18444"
ProtocolVersion uint32 = 70001
TxVersion = 1
// MainPort is the port used by default on the main network.
MainPort = "8333"
// TestNetPort is the port used by default on the test network (version
// 3).
TestNetPort = "18333"
// RegressionTestPort is the port used by default on the regression test
// network.
RegressionTestPort = "18444"
// ProtocolVersion is the latest protocol version this package supports.
ProtocolVersion uint32 = 70001
TxVersion = 1
// MultipleAddressVersion is the protocol version which added multiple
// addresses per message (pver >= MultipleAddressVersion).
@ -42,6 +52,7 @@ const (
type ServiceFlag uint64
const (
// SFNodeNetwork is a flag used to indicate a peer is a full node.
SFNodeNetwork ServiceFlag = 1 << iota
)

View file

@ -12,8 +12,12 @@ import (
// Size of array used to store sha hashes. See ShaHash.
const HashSize = 32
// MaxHashStringSize is the maximum length of a ShaHash hash string.
const MaxHashStringSize = HashSize * 2
// ErrHashStrSize describes an error that indicates the caller specified a hash
// string that has too many characters.
var ErrHashStrSize = fmt.Errorf("Max hash length is %v chars", MaxHashStringSize)
// ShaHash is used in several of the bitcoin messages and common structures. It