Documentation
¶
Index ¶
Constants ¶
View Source
const ( ProtocolID = "/confirmix/1.0.0" BlockchainSync = "/blockchain/sync" BlockAnnouncement = "/block/announcement" ValidatorAnnouncement = "/validator/announcement" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Type string `json:"type"`
Payload interface{} `json:"payload"`
}
Message represents a network message
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a P2P network node
func NewNode ¶
func NewNode(listenPort int, bc *blockchain.Blockchain) (*Node, error)
NewNode creates a new P2P node
func (*Node) GetMultiaddr ¶
GetMultiaddr returns the node's multiaddress
Click to show internal directories.
Click to hide internal directories.