Documentation
¶
Index ¶
- func GenBlocks() []*types.Block
- func GenBlocksByBlock(bc *types.Block) []*types.Block
- func GenDefaultMessageWithBytes(source int, data []byte) *notify.DefaultMessage
- func GenErrorBlockHeaders() []*types.BlockHeader
- func GenErrorDefaultMessage(source int) *notify.DefaultMessage
- func GenErrorDefaultMessageWithBlockHeader(source int, bh *types.BlockHeader) *notify.DefaultMessage
- func GenHashCorrectBlocks() []*types.Block
- func GenHashCorrectBlocksByFirstHash(firstBlockHash common.Hash, len int) []*types.Block
- func GenOnlyHasTransBlocks() []*types.Block
- func GeneCorrectBlockHeaders() []*types.BlockHeader
- func GeneCorrectBlockHeadersByFirstHash(firstHash common.Hash, len int) []*types.BlockHeader
- func GeneErrorBlockHeaders() []*types.BlockHeader
- func MarshalErorSyncRequest() ([]byte, error)
- func MarshalNilSyncRequest() ([]byte, error)
- func NewBlock(bh *types.BlockHeader, txs []*types.RawTransaction) *types.Block
- func NewBlockWithTxs(txs []*types.RawTransaction) *types.Block
- func NewCorrectBlockHeader(hash common.Hash, preHash common.Hash) *types.BlockHeader
- func NewNilBlockHeader() *types.BlockHeader
- func NewNilHeaderMessage(source string) *notify.DefaultMessage
- func NewRandomErrorBlockHeader() *types.BlockHeader
- func NewRandomFullBlockHeader(height uint64) *types.BlockHeader
- type Block
- func (*Block) Descriptor() ([]byte, []int)
- func (m *Block) GetHeader() *BlockHeader
- func (m *Block) GetTransactions() []*Transaction
- func (*Block) ProtoMessage()
- func (m *Block) Reset()
- func (m *Block) String() string
- func (m *Block) XXX_DiscardUnknown()
- func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Block) XXX_Merge(src proto.Message)
- func (m *Block) XXX_Size() int
- func (m *Block) XXX_Unmarshal(b []byte) error
- type BlockHeader
- func (*BlockHeader) Descriptor() ([]byte, []int)
- func (m *BlockHeader) GetCastor() []byte
- func (m *BlockHeader) GetCurTime() int64
- func (m *BlockHeader) GetElapsed() int32
- func (m *BlockHeader) GetExtraData() []byte
- func (m *BlockHeader) GetGasFee() uint64
- func (m *BlockHeader) GetGroupId() []byte
- func (m *BlockHeader) GetHash() []byte
- func (m *BlockHeader) GetHeight() string
- func (m *BlockHeader) GetNonce() int32
- func (m *BlockHeader) GetPreHash() []byte
- func (m *BlockHeader) GetProveValue() []byte
- func (m *BlockHeader) GetRandom() []byte
- func (m *BlockHeader) GetReceiptTree() []byte
- func (m *BlockHeader) GetSignature() []byte
- func (m *BlockHeader) GetStateTree() []byte
- func (m *BlockHeader) GetTotalQN() uint64
- func (m *BlockHeader) GetTxTree() []byte
- func (*BlockHeader) ProtoMessage()
- func (m *BlockHeader) Reset()
- func (m *BlockHeader) String() string
- func (m *BlockHeader) XXX_DiscardUnknown()
- func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockHeader) XXX_Merge(src proto.Message)
- func (m *BlockHeader) XXX_Size() int
- func (m *BlockHeader) XXX_Unmarshal(b []byte) error
- type BlockResponseMsg
- func (*BlockResponseMsg) Descriptor() ([]byte, []int)
- func (m *BlockResponseMsg) GetBlocks() []*Block
- func (*BlockResponseMsg) ProtoMessage()
- func (m *BlockResponseMsg) Reset()
- func (m *BlockResponseMsg) String() string
- func (m *BlockResponseMsg) XXX_DiscardUnknown()
- func (m *BlockResponseMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockResponseMsg) XXX_Merge(src proto.Message)
- func (m *BlockResponseMsg) XXX_Size() int
- func (m *BlockResponseMsg) XXX_Unmarshal(b []byte) error
- type SyncRequest
- func (*SyncRequest) Descriptor() ([]byte, []int)
- func (m *SyncRequest) GetReqHeight() int64
- func (m *SyncRequest) GetReqSize() int64
- func (*SyncRequest) ProtoMessage()
- func (m *SyncRequest) Reset()
- func (m *SyncRequest) String() string
- func (m *SyncRequest) XXX_DiscardUnknown()
- func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SyncRequest) XXX_Merge(src proto.Message)
- func (m *SyncRequest) XXX_Size() int
- func (m *SyncRequest) XXX_Unmarshal(b []byte) error
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (m *Transaction) GetData() []byte
- func (m *Transaction) GetExtraData() []byte
- func (m *Transaction) GetGasLimit() []byte
- func (m *Transaction) GetGasPrice() []byte
- func (m *Transaction) GetHash() []byte
- func (m *Transaction) GetNonce() uint64
- func (m *Transaction) GetSign() []byte
- func (m *Transaction) GetTarget() []byte
- func (m *Transaction) GetType() int32
- func (m *Transaction) GetValue() []byte
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (m *Transaction) String() string
- func (m *Transaction) XXX_DiscardUnknown()
- func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Transaction) XXX_Merge(src proto.Message)
- func (m *Transaction) XXX_Size() int
- func (m *Transaction) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenDefaultMessageWithBytes ¶
func GenDefaultMessageWithBytes(source int, data []byte) *notify.DefaultMessage
func GenErrorBlockHeaders ¶
func GenErrorBlockHeaders() []*types.BlockHeader
func GenErrorDefaultMessage ¶
func GenErrorDefaultMessage(source int) *notify.DefaultMessage
func GenErrorDefaultMessageWithBlockHeader ¶
func GenErrorDefaultMessageWithBlockHeader(source int, bh *types.BlockHeader) *notify.DefaultMessage
func GenHashCorrectBlocks ¶
func GenOnlyHasTransBlocks ¶
func GeneCorrectBlockHeaders ¶
func GeneCorrectBlockHeaders() []*types.BlockHeader
func GeneCorrectBlockHeadersByFirstHash ¶
func GeneCorrectBlockHeadersByFirstHash(firstHash common.Hash, len int) []*types.BlockHeader
func GeneErrorBlockHeaders ¶
func GeneErrorBlockHeaders() []*types.BlockHeader
func MarshalErorSyncRequest ¶
func MarshalNilSyncRequest ¶
func NewBlock ¶
func NewBlock(bh *types.BlockHeader, txs []*types.RawTransaction) *types.Block
func NewBlockWithTxs ¶
func NewBlockWithTxs(txs []*types.RawTransaction) *types.Block
func NewCorrectBlockHeader ¶
func NewNilBlockHeader ¶
func NewNilBlockHeader() *types.BlockHeader
func NewNilHeaderMessage ¶
func NewNilHeaderMessage(source string) *notify.DefaultMessage
func NewRandomErrorBlockHeader ¶
func NewRandomErrorBlockHeader() *types.BlockHeader
func NewRandomFullBlockHeader ¶
func NewRandomFullBlockHeader(height uint64) *types.BlockHeader
Types ¶
type Block ¶
type Block struct { Header *BlockHeader `protobuf:"bytes,1,req,name=Header" json:"Header,omitempty"` Transactions []*Transaction `protobuf:"bytes,2,rep,name=transactions" json:"transactions,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Block) Descriptor ¶
func (*Block) GetHeader ¶
func (m *Block) GetHeader() *BlockHeader
func (*Block) GetTransactions ¶
func (m *Block) GetTransactions() []*Transaction
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) XXX_DiscardUnknown ¶
func (m *Block) XXX_DiscardUnknown()
func (*Block) XXX_Marshal ¶
func (*Block) XXX_Unmarshal ¶
type BlockHeader ¶
type BlockHeader struct { Hash []byte `protobuf:"bytes,1,opt,name=Hash" json:"Hash,omitempty"` Height *string `protobuf:"bytes,2,opt,name=Height" json:"Height,omitempty"` PreHash []byte `protobuf:"bytes,3,opt,name=PreHash" json:"PreHash,omitempty"` Elapsed *int32 `protobuf:"varint,4,opt,name=Elapsed" json:"Elapsed,omitempty"` ProveValue []byte `protobuf:"bytes,5,opt,name=ProveValue" json:"ProveValue,omitempty"` TotalQN *uint64 `protobuf:"varint,6,opt,name=TotalQN" json:"TotalQN,omitempty"` CurTime *int64 `protobuf:"varint,7,opt,name=CurTime" json:"CurTime,omitempty"` Castor []byte `protobuf:"bytes,8,opt,name=Castor" json:"Castor,omitempty"` GroupId []byte `protobuf:"bytes,9,opt,name=GroupId" json:"GroupId,omitempty"` Signature []byte `protobuf:"bytes,10,opt,name=Signature" json:"Signature,omitempty"` Nonce *int32 `protobuf:"varint,11,opt,name=Nonce" json:"Nonce,omitempty"` TxTree []byte `protobuf:"bytes,12,opt,name=TxTree" json:"TxTree,omitempty"` ReceiptTree []byte `protobuf:"bytes,13,opt,name=ReceiptTree" json:"ReceiptTree,omitempty"` StateTree []byte `protobuf:"bytes,14,opt,name=StateTree" json:"StateTree,omitempty"` ExtraData []byte `protobuf:"bytes,15,opt,name=ExtraData" json:"ExtraData,omitempty"` Random []byte `protobuf:"bytes,16,opt,name=Random" json:"Random,omitempty"` GasFee *uint64 `protobuf:"varint,17,opt,name=GasFee" json:"GasFee,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockHeader) Descriptor ¶
func (*BlockHeader) Descriptor() ([]byte, []int)
func (*BlockHeader) GetCastor ¶
func (m *BlockHeader) GetCastor() []byte
func (*BlockHeader) GetCurTime ¶
func (m *BlockHeader) GetCurTime() int64
func (*BlockHeader) GetElapsed ¶
func (m *BlockHeader) GetElapsed() int32
func (*BlockHeader) GetExtraData ¶
func (m *BlockHeader) GetExtraData() []byte
func (*BlockHeader) GetGasFee ¶
func (m *BlockHeader) GetGasFee() uint64
func (*BlockHeader) GetGroupId ¶
func (m *BlockHeader) GetGroupId() []byte
func (*BlockHeader) GetHash ¶
func (m *BlockHeader) GetHash() []byte
func (*BlockHeader) GetHeight ¶
func (m *BlockHeader) GetHeight() string
func (*BlockHeader) GetNonce ¶
func (m *BlockHeader) GetNonce() int32
func (*BlockHeader) GetPreHash ¶
func (m *BlockHeader) GetPreHash() []byte
func (*BlockHeader) GetProveValue ¶
func (m *BlockHeader) GetProveValue() []byte
func (*BlockHeader) GetRandom ¶
func (m *BlockHeader) GetRandom() []byte
func (*BlockHeader) GetReceiptTree ¶
func (m *BlockHeader) GetReceiptTree() []byte
func (*BlockHeader) GetSignature ¶
func (m *BlockHeader) GetSignature() []byte
func (*BlockHeader) GetStateTree ¶
func (m *BlockHeader) GetStateTree() []byte
func (*BlockHeader) GetTotalQN ¶
func (m *BlockHeader) GetTotalQN() uint64
func (*BlockHeader) GetTxTree ¶
func (m *BlockHeader) GetTxTree() []byte
func (*BlockHeader) ProtoMessage ¶
func (*BlockHeader) ProtoMessage()
func (*BlockHeader) Reset ¶
func (m *BlockHeader) Reset()
func (*BlockHeader) String ¶
func (m *BlockHeader) String() string
func (*BlockHeader) XXX_DiscardUnknown ¶
func (m *BlockHeader) XXX_DiscardUnknown()
func (*BlockHeader) XXX_Marshal ¶
func (m *BlockHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockHeader) XXX_Merge ¶
func (m *BlockHeader) XXX_Merge(src proto.Message)
func (*BlockHeader) XXX_Size ¶
func (m *BlockHeader) XXX_Size() int
func (*BlockHeader) XXX_Unmarshal ¶
func (m *BlockHeader) XXX_Unmarshal(b []byte) error
type BlockResponseMsg ¶
type BlockResponseMsg struct { Blocks []*Block `protobuf:"bytes,1,rep,name=Blocks" json:"Blocks,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockResponseMsg) Descriptor ¶
func (*BlockResponseMsg) Descriptor() ([]byte, []int)
func (*BlockResponseMsg) GetBlocks ¶
func (m *BlockResponseMsg) GetBlocks() []*Block
func (*BlockResponseMsg) ProtoMessage ¶
func (*BlockResponseMsg) ProtoMessage()
func (*BlockResponseMsg) Reset ¶
func (m *BlockResponseMsg) Reset()
func (*BlockResponseMsg) String ¶
func (m *BlockResponseMsg) String() string
func (*BlockResponseMsg) XXX_DiscardUnknown ¶
func (m *BlockResponseMsg) XXX_DiscardUnknown()
func (*BlockResponseMsg) XXX_Marshal ¶
func (m *BlockResponseMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockResponseMsg) XXX_Merge ¶
func (m *BlockResponseMsg) XXX_Merge(src proto.Message)
func (*BlockResponseMsg) XXX_Size ¶
func (m *BlockResponseMsg) XXX_Size() int
func (*BlockResponseMsg) XXX_Unmarshal ¶
func (m *BlockResponseMsg) XXX_Unmarshal(b []byte) error
type SyncRequest ¶
type SyncRequest struct { ReqHeight *int64 `protobuf:"varint,1,opt,name=ReqHeight" json:"ReqHeight,omitempty"` ReqSize *int64 `protobuf:"varint,2,opt,name=ReqSize" json:"ReqSize,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SyncRequest) Descriptor ¶
func (*SyncRequest) Descriptor() ([]byte, []int)
func (*SyncRequest) GetReqHeight ¶
func (m *SyncRequest) GetReqHeight() int64
func (*SyncRequest) GetReqSize ¶
func (m *SyncRequest) GetReqSize() int64
func (*SyncRequest) ProtoMessage ¶
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) Reset ¶
func (m *SyncRequest) Reset()
func (*SyncRequest) String ¶
func (m *SyncRequest) String() string
func (*SyncRequest) XXX_DiscardUnknown ¶
func (m *SyncRequest) XXX_DiscardUnknown()
func (*SyncRequest) XXX_Marshal ¶
func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SyncRequest) XXX_Merge ¶
func (m *SyncRequest) XXX_Merge(src proto.Message)
func (*SyncRequest) XXX_Size ¶
func (m *SyncRequest) XXX_Size() int
func (*SyncRequest) XXX_Unmarshal ¶
func (m *SyncRequest) XXX_Unmarshal(b []byte) error
type Transaction ¶
type Transaction struct { Data []byte `protobuf:"bytes,1,opt,name=Data" json:"Data,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=Value" json:"Value,omitempty"` Nonce *uint64 `protobuf:"varint,3,req,name=Nonce" json:"Nonce,omitempty"` Target []byte `protobuf:"bytes,4,opt,name=Target" json:"Target,omitempty"` GasLimit []byte `protobuf:"bytes,5,req,name=GasLimit" json:"GasLimit,omitempty"` GasPrice []byte `protobuf:"bytes,6,req,name=GasPrice" json:"GasPrice,omitempty"` Hash []byte `protobuf:"bytes,7,req,name=Hash" json:"Hash,omitempty"` ExtraData []byte `protobuf:"bytes,8,opt,name=ExtraData" json:"ExtraData,omitempty"` Type *int32 `protobuf:"varint,9,req,name=Type" json:"Type,omitempty"` Sign []byte `protobuf:"bytes,10,opt,name=Sign" json:"Sign,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (*Transaction) GetData ¶
func (m *Transaction) GetData() []byte
func (*Transaction) GetExtraData ¶
func (m *Transaction) GetExtraData() []byte
func (*Transaction) GetGasLimit ¶
func (m *Transaction) GetGasLimit() []byte
func (*Transaction) GetGasPrice ¶
func (m *Transaction) GetGasPrice() []byte
func (*Transaction) GetHash ¶
func (m *Transaction) GetHash() []byte
func (*Transaction) GetNonce ¶
func (m *Transaction) GetNonce() uint64
func (*Transaction) GetSign ¶
func (m *Transaction) GetSign() []byte
func (*Transaction) GetTarget ¶
func (m *Transaction) GetTarget() []byte
func (*Transaction) GetType ¶
func (m *Transaction) GetType() int32
func (*Transaction) GetValue ¶
func (m *Transaction) GetValue() []byte
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) String ¶
func (m *Transaction) String() string
func (*Transaction) XXX_DiscardUnknown ¶
func (m *Transaction) XXX_DiscardUnknown()
func (*Transaction) XXX_Marshal ¶
func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Transaction) XXX_Merge ¶
func (m *Transaction) XXX_Merge(src proto.Message)
func (*Transaction) XXX_Size ¶
func (m *Transaction) XXX_Size() int
func (*Transaction) XXX_Unmarshal ¶
func (m *Transaction) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.