Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FastSum64 ¶
FastSum64 returns a hash sum of the input data using highwayhash. This method is not secure, but may be used as a quick identifier for objects where collisions are acceptable.
func FastSum256 ¶
FastSum256 returns a hash sum of the input data using highwayhash. This method is not secure, but may be used as a quick identifier for objects where collisions are acceptable.
Types ¶
type Config ¶
type Config struct {
NoDiscovery bool
EnableUPnP bool
StaticPeers []string
BootstrapNodeAddr []string
Discv5BootStrapAddr []string
DataDir string
MaxPeers uint
MaxInbound int
MetaDataDir string
ReadWritePermissions os.FileMode
AllowListCIDR string
DenyListCIDR []string
TCPPort uint
UDPPort uint
EnableNoise bool
RelayNodeAddr string
LocalIP string
HostAddress string
HostDNS string
PrivateKey string
Encoding string
// ProtocolVersion specifies the maximum protocol version to use and
// advertise.
ProtocolVersion uint32
Services protocol.ServiceFlag
UserAgent string
// DisableRelayTx specifies if the remote peer should be informed to
// not send inv messages for transactions.
DisableRelayTx bool
MaxOrphanTxs int
Params *params.Params
Banning bool // Open or not ban module
DisableListen bool
LANPeers []string
IsCircuit bool
Consistency bool
}
Config for the p2p service. to initialize the p2p service.
type Error ¶
func NewErrorStr ¶ added in v1.0.21
func NewSuccess ¶ added in v1.0.21
func NewSuccess() *Error
type ErrorCode ¶
type ErrorCode int
ErrorCode identifies a kind of error.
const ( // There are no errors by default ErrNone ErrorCode = iota // p2p stream write error ErrStreamWrite // p2p stream read error ErrStreamRead // p2p stream base error ErrStreamBase // p2p peer unknown error ErrPeerUnknown // p2p peer bad error ErrBadPeer // p2p DAG consensus error ErrDAGConsensus // p2p message error ErrMessage // Generic rule error ErrGeneric // peer connect frequent ErrConnectFrequent // Sequence error ErrSequence // revalidate error ErrRevalidate // libp2p connect ErrLibp2pConnect )
func (ErrorCode) IsDAGConsensus ¶ added in v1.0.21
type QMultiaddr ¶
type QMultiaddr struct {
// contains filtered or unexported fields
}
func QMultiAddrFromString ¶
func QMultiAddrFromString(address string) (*QMultiaddr, error)
func (*QMultiaddr) String ¶
func (qm *QMultiaddr) String() string
Click to show internal directories.
Click to hide internal directories.