Documentation ¶
Index ¶
- Constants
- Variables
- type Node
- func (node *Node) AddInvMsgTx(txid string, msgTx *wire.MsgTx)
- func (node *Node) AddPeer(conn net.Conn)
- func (node *Node) BroadcastTxInv(txid string)
- func (node *Node) GetConnectedPeer(addr string) *peer.Peer
- func (node *Node) GetConnectedPeers() []*peer.Peer
- func (node *Node) GetInvMsgTx(txid string) *wire.MsgTx
- func (node *Node) RemoveInvTx(txid string) error
- func (node *Node) Start()
- func (node *Node) Stop()
- type NodeConfig
Constants ¶
View Source
const (
SFNodeBitcoinCash wire.ServiceFlag = 1 << 5
)
Variables ¶
View Source
var ( DefualtNodeBootstrapCount = 17 DefaultNodeAddTimes = 4 DefaultNodeTimeout = 5 * time.Second )
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func NewNode ¶
func NewNode(config *NodeConfig) *Node
func (*Node) BroadcastTxInv ¶
func (*Node) GetConnectedPeers ¶
func (*Node) RemoveInvTx ¶
type NodeConfig ¶
type NodeConfig struct { IsTestnet bool // The target number of outbound peers. Defaults to 10. TargetOutbound uint32 // UserAgentName specifies the user agent name to advertise. It is // highly recommended to specify this value. UserAgentName string // UserAgentVersion specifies the user agent version to advertise. It // is highly recommended to specify this value and that it follows the // form "major.minor.revision" e.g. "2.6.41". UserAgentVersion string // Chan for Tx TxChan chan *types.Tx // Chan for Block BChan chan *types.Block }
Click to show internal directories.
Click to hide internal directories.