Documentation ¶
Index ¶
- Constants
- func FetchBlockByHeightAndHash(fsm Manager, h int64, hash []byte, cancelCh <-chan struct{}) (module.BlockData, []byte, error)
- type BlockData
- type BlockMetadata
- type BlockProofProvider
- type BlockRequest
- type BlockRequestV1
- type BlockRequestV2
- type BlockResult
- type CancelAllBlockRequests
- type FetchCallback
- type Manager
- type MessageItem
- type ServerCallback
Constants ¶
View Source
const ( ProtoBlockRequest module.ProtocolInfo = iota << 8 ProtoBlockMetadata ProtoBlockData ProtoCancelAllBlockRequests )
TODO: close message
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockMetadata ¶
type BlockProofProvider ¶
type BlockRequest ¶
type BlockRequest = BlockRequestV2
func (*BlockRequest) RLPDecodeSelf ¶
func (m *BlockRequest) RLPDecodeSelf(d codec.Decoder) error
func (*BlockRequest) RLPEncodeSelf ¶
func (m *BlockRequest) RLPEncodeSelf(e codec.Encoder) error
type BlockRequestV1 ¶
type BlockRequestV2 ¶
type BlockResult ¶
type CancelAllBlockRequests ¶
type CancelAllBlockRequests struct { }
type FetchCallback ¶
type FetchCallback interface { OnBlock(br BlockResult) OnEnd(err error) }
type Manager ¶
type Manager interface { StartServer() StopServer() FetchBlocks( begin int64, end int64, cb FetchCallback, ) (canceler func() bool, err error) Term() }
func NewManager ¶
func NewManager( nm module.NetworkManager, bm module.BlockManager, bpp BlockProofProvider, logger log.Logger, ) (Manager, error)
func NewManagerOnlyForClient ¶ added in v1.2.11
func NewManagerOnlyForClient( nm module.NetworkManager, bdf module.BlockDataFactory, logger log.Logger, ) (Manager, error)
type MessageItem ¶
type MessageItem struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.