Add several comments for exported constants.
This commit is contained in:
parent
d6752d8f99
commit
035a9c3dc3
2 changed files with 20 additions and 5 deletions
11
protocol.go
11
protocol.go
|
@ -10,10 +10,20 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
// 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
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue