Documentation ¶
Index ¶
- Constants
- Variables
- func Add(p *Peer)
- func PeerInfos() []*p2p.PeerInfo
- func Remove(p *Peer)
- func Size() uint32
- type Block
- type Broadcast
- func (b *Broadcast) AnnounceBlock(hash common.Hash, number uint64)
- func (b *Broadcast) AnnounceBlocks()
- func (b *Broadcast) AnnounceTransactions()
- func (b *Broadcast) AnnounceTx(tx common.Hash)
- func (b *Broadcast) Close()
- func (b *Broadcast) SendAnnounceBlock(hash common.Hash, number uint64) error
- func (b *Broadcast) SendAnnounceTx(txs []common.Hash) error
- type Cache
- type Info
- type Peer
- func (p *Peer) AddRequestTxs(n uint32)
- func (p *Peer) AnnounceBlock(hash common.Hash, number uint64)
- func (p *Peer) AnnounceTx(tx common.Hash)
- func (p *Peer) Close()
- func (p *Peer) Handshake(version uint32, networkId uint64) error
- func (p *Peer) Info() *Info
- func (p *Peer) IsBootstrap() bool
- func (p *Peer) IsKnownBlock(hash common.Hash) bool
- func (p *Peer) IsKnownTx(hash common.Hash) bool
- func (p *Peer) IsStatic() bool
- func (p *Peer) IsTrusted() bool
- func (p *Peer) KnownBlock(hash common.Hash)
- func (p *Peer) KnownTx(hash common.Hash)
- func (p *Peer) Loop()
- func (p *Peer) Peer() *p2p.Peer
- func (p *Peer) RW() p2p.MsgReadWriter
- func (p *Peer) RequestTxs() uint32
- func (p *Peer) Send(msgCode uint64, msg interface{}) error
- func (p *Peer) Sync(t int)
- func (p *Peer) TxBroadcast() bool
- type Requests
- type Status
Constants ¶
View Source
const ( BlockSync = iota TxSync )
Variables ¶
View Source
var StatusSync *packet.StatusPacket
Functions ¶
Types ¶
type Broadcast ¶
type Broadcast struct {
// contains filtered or unexported fields
}
func NewBroadcast ¶
func (*Broadcast) AnnounceBlock ¶
func (*Broadcast) AnnounceBlocks ¶
func (b *Broadcast) AnnounceBlocks()
func (*Broadcast) AnnounceTransactions ¶
func (b *Broadcast) AnnounceTransactions()
func (*Broadcast) AnnounceTx ¶
func (*Broadcast) SendAnnounceBlock ¶
type Peer ¶
func (*Peer) AddRequestTxs ¶
func (*Peer) AnnounceTx ¶
func (*Peer) IsBootstrap ¶
func (*Peer) KnownBlock ¶
func (*Peer) RW ¶
func (p *Peer) RW() p2p.MsgReadWriter
func (*Peer) RequestTxs ¶
func (*Peer) TxBroadcast ¶
Click to show internal directories.
Click to hide internal directories.