Documentation
¶
Index ¶
Constants ¶
View Source
const (
// MaxBlocksPerMsg is the maximum number of blocks allowed per message.
MaxBlocksPerMsg = 500
)
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func New ¶
func New(dataDir string, chain *blockchain.BlockChain, txPool *mempool.TxPool, params *config.Params) (*server, error)
newServer returns a new btcd server configured to listen on addr for the network type specified by chainParams. Use start to begin accepting connections from peers.
Types ¶
type Server ¶
type Server interface {
svr.IServer
// Services returns the service flags the server supports.
Services() pact.ServiceFlag
// NewPeer adds a new peer that has already been connected to the server.
NewPeer(p svr.IPeer)
// DonePeer removes a peer that has already been connected to the server by ip.
DonePeer(p svr.IPeer)
// RelayInventory relays the passed inventory vector to all connected peers
// that are not already known to have it.
RelayInventory(invVect *msg.InvVect, data interface{})
}
Click to show internal directories.
Click to hide internal directories.