func (e *BlockPeerError) Error() string {
	return e.err.Error()
}
Error implements function of the standard go error interface.
package p2p
import (
	"errors"
	"fmt"
	"time"
)
var (
	ErrPeerNotFound = errors.New("peer not found")
	ErrAlreadyConnected = errors.New("already connected")
	ErrDialLightNode = errors.New("target peer is a light node")
)
const (
	DefaultBlocklistTime = 1 * time.Minute
)
type ConnectionBackoffError struct {
	tryAfter time.Time
	err      error
}
func NewConnectionBackoffError(err error, tryAfter time.Time) error {
	return &ConnectionBackoffError{err: err, tryAfter: tryAfter}
}
func (e *ConnectionBackoffError) TryAfter() time.Time {
	return e.tryAfter
}
func (e *ConnectionBackoffError) Unwrap() error { return e.err }
func (e *ConnectionBackoffError) Error() string {
	return e.err.Error()
}
type DisconnectError struct {
	err error
}
func NewDisconnectError(err error) error {
	return &DisconnectError{
		err: err,
	}
}
func (e *DisconnectError) Unwrap() error { return e.err }
func (e *DisconnectError) Error() string {
	return e.err.Error()
}
type BlockPeerError struct {
	duration time.Duration
	err      error
}
func NewBlockPeerError(duration time.Duration, err error) error {
	return &BlockPeerError{
		duration: duration,
		err:      err,
	}
}
func (e *BlockPeerError) Unwrap() error { return e.err }