Documentation ¶
Index ¶
- Variables
- func NewHistoryRepository(arguments HistoryRepositoryArguments) (*historyProcessor, error)
- func NewNilHistoryRepository() (*nilHistoryRepository, error)
- type EpochByHash
- func (*EpochByHash) Descriptor() ([]byte, []int)
- func (this *EpochByHash) Equal(that interface{}) bool
- func (m *EpochByHash) GetEpoch() uint32
- func (this *EpochByHash) GoString() string
- func (m *EpochByHash) Marshal() (dAtA []byte, err error)
- func (m *EpochByHash) MarshalTo(dAtA []byte) (int, error)
- func (m *EpochByHash) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EpochByHash) ProtoMessage()
- func (m *EpochByHash) Reset()
- func (m *EpochByHash) Size() (n int)
- func (this *EpochByHash) String() string
- func (m *EpochByHash) Unmarshal(dAtA []byte) error
- func (m *EpochByHash) XXX_DiscardUnknown()
- func (m *EpochByHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EpochByHash) XXX_Merge(src proto.Message)
- func (m *EpochByHash) XXX_Size() int
- func (m *EpochByHash) XXX_Unmarshal(b []byte) error
- type HistoryRepository
- type HistoryRepositoryArguments
- type HistoryRepositoryFactory
- type HistoryTransactionWithEpoch
- type HistoryTransactionsData
- type TransactionsGroupMetadata
- func (*TransactionsGroupMetadata) Descriptor() ([]byte, []int)
- func (this *TransactionsGroupMetadata) Equal(that interface{}) bool
- func (m *TransactionsGroupMetadata) GetHeaderHash() []byte
- func (m *TransactionsGroupMetadata) GetHeaderNonce() uint64
- func (m *TransactionsGroupMetadata) GetMbHash() []byte
- func (m *TransactionsGroupMetadata) GetRcvShardID() uint32
- func (m *TransactionsGroupMetadata) GetRound() uint64
- func (m *TransactionsGroupMetadata) GetSndShardID() uint32
- func (m *TransactionsGroupMetadata) GetStatus() []byte
- func (this *TransactionsGroupMetadata) GoString() string
- func (m *TransactionsGroupMetadata) Marshal() (dAtA []byte, err error)
- func (m *TransactionsGroupMetadata) MarshalTo(dAtA []byte) (int, error)
- func (m *TransactionsGroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TransactionsGroupMetadata) ProtoMessage()
- func (m *TransactionsGroupMetadata) Reset()
- func (m *TransactionsGroupMetadata) Size() (n int)
- func (this *TransactionsGroupMetadata) String() string
- func (m *TransactionsGroupMetadata) Unmarshal(dAtA []byte) error
- func (m *TransactionsGroupMetadata) XXX_DiscardUnknown()
- func (m *TransactionsGroupMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TransactionsGroupMetadata) XXX_Merge(src proto.Message)
- func (m *TransactionsGroupMetadata) XXX_Size() int
- func (m *TransactionsGroupMetadata) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthHashEpoch = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHashEpoch = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupHashEpoch = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTransactionsGroupMetadata = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTransactionsGroupMetadata = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTransactionsGroupMetadata = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func NewHistoryRepository ¶
func NewHistoryRepository(arguments HistoryRepositoryArguments) (*historyProcessor, error)
NewHistoryRepository will create a new instance of HistoryRepository
func NewNilHistoryRepository ¶
func NewNilHistoryRepository() (*nilHistoryRepository, error)
NewNilHistoryRepository returns a not implemented history repository
Types ¶
type EpochByHash ¶
type EpochByHash struct {
Epoch uint32 `protobuf:"varint,1,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
}
EpochByHash is used to store information about a hash to know which epoch it belongs to
func (*EpochByHash) Descriptor ¶
func (*EpochByHash) Descriptor() ([]byte, []int)
func (*EpochByHash) Equal ¶
func (this *EpochByHash) Equal(that interface{}) bool
func (*EpochByHash) GetEpoch ¶
func (m *EpochByHash) GetEpoch() uint32
func (*EpochByHash) GoString ¶
func (this *EpochByHash) GoString() string
func (*EpochByHash) Marshal ¶
func (m *EpochByHash) Marshal() (dAtA []byte, err error)
func (*EpochByHash) MarshalToSizedBuffer ¶
func (m *EpochByHash) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EpochByHash) ProtoMessage ¶
func (*EpochByHash) ProtoMessage()
func (*EpochByHash) Reset ¶
func (m *EpochByHash) Reset()
func (*EpochByHash) Size ¶
func (m *EpochByHash) Size() (n int)
func (*EpochByHash) String ¶
func (this *EpochByHash) String() string
func (*EpochByHash) Unmarshal ¶
func (m *EpochByHash) Unmarshal(dAtA []byte) error
func (*EpochByHash) XXX_DiscardUnknown ¶
func (m *EpochByHash) XXX_DiscardUnknown()
func (*EpochByHash) XXX_Marshal ¶
func (m *EpochByHash) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EpochByHash) XXX_Merge ¶
func (m *EpochByHash) XXX_Merge(src proto.Message)
func (*EpochByHash) XXX_Size ¶
func (m *EpochByHash) XXX_Size() int
func (*EpochByHash) XXX_Unmarshal ¶
func (m *EpochByHash) XXX_Unmarshal(b []byte) error
type HistoryRepository ¶
type HistoryRepository interface { PutTransactionsData(htd *HistoryTransactionsData) error GetTransaction(hash []byte) (*HistoryTransactionWithEpoch, error) GetEpochForHash(hash []byte) (uint32, error) IsEnabled() bool IsInterfaceNil() bool }
HistoryRepository provides methods needed for the history data processing
type HistoryRepositoryArguments ¶
type HistoryRepositoryArguments struct { SelfShardID uint32 HistoryStorer storage.Storer HashEpochStorer storage.Storer Marshalizer marshal.Marshalizer Hasher hashing.Hasher }
HistoryRepositoryArguments is a structure that stores all components that are needed to a history processor
type HistoryRepositoryFactory ¶
type HistoryRepositoryFactory interface { Create() (HistoryRepository, error) IsInterfaceNil() bool }
HistoryRepositoryFactory can create new instances of HistoryRepository
type HistoryTransactionWithEpoch ¶
type HistoryTransactionWithEpoch struct { Epoch uint32 *TransactionsGroupMetadata }
HistoryTransactionWithEpoch is a structure for a history transaction that also contain epoch
type HistoryTransactionsData ¶
type HistoryTransactionsData struct { HeaderHash []byte HeaderHandler data.HeaderHandler BodyHandler data.BodyHandler }
HistoryTransactionsData is a structure that stores information about history transactions
type TransactionsGroupMetadata ¶
type TransactionsGroupMetadata struct { RcvShardID uint32 `protobuf:"varint,1,opt,name=RcvShardID,proto3" json:"RcvShardID,omitempty"` SndShardID uint32 `protobuf:"varint,2,opt,name=SndShardID,proto3" json:"SndShardID,omitempty"` Round uint64 `protobuf:"varint,3,opt,name=Round,proto3" json:"Round,omitempty"` HeaderNonce uint64 `protobuf:"varint,4,opt,name=HeaderNonce,proto3" json:"HeaderNonce,omitempty"` HeaderHash []byte `protobuf:"bytes,5,opt,name=HeaderHash,proto3" json:"HeaderHash,omitempty"` MbHash []byte `protobuf:"bytes,6,opt,name=MbHash,proto3" json:"MbHash,omitempty"` Status []byte `protobuf:"bytes,7,opt,name=Status,proto3" json:"Status,omitempty"` }
TransactionsGroupMetadata is used to store information about a history transaction
func (*TransactionsGroupMetadata) Descriptor ¶
func (*TransactionsGroupMetadata) Descriptor() ([]byte, []int)
func (*TransactionsGroupMetadata) Equal ¶
func (this *TransactionsGroupMetadata) Equal(that interface{}) bool
func (*TransactionsGroupMetadata) GetHeaderHash ¶
func (m *TransactionsGroupMetadata) GetHeaderHash() []byte
func (*TransactionsGroupMetadata) GetHeaderNonce ¶
func (m *TransactionsGroupMetadata) GetHeaderNonce() uint64
func (*TransactionsGroupMetadata) GetMbHash ¶
func (m *TransactionsGroupMetadata) GetMbHash() []byte
func (*TransactionsGroupMetadata) GetRcvShardID ¶
func (m *TransactionsGroupMetadata) GetRcvShardID() uint32
func (*TransactionsGroupMetadata) GetRound ¶
func (m *TransactionsGroupMetadata) GetRound() uint64
func (*TransactionsGroupMetadata) GetSndShardID ¶
func (m *TransactionsGroupMetadata) GetSndShardID() uint32
func (*TransactionsGroupMetadata) GetStatus ¶
func (m *TransactionsGroupMetadata) GetStatus() []byte
func (*TransactionsGroupMetadata) GoString ¶
func (this *TransactionsGroupMetadata) GoString() string
func (*TransactionsGroupMetadata) Marshal ¶
func (m *TransactionsGroupMetadata) Marshal() (dAtA []byte, err error)
func (*TransactionsGroupMetadata) MarshalTo ¶
func (m *TransactionsGroupMetadata) MarshalTo(dAtA []byte) (int, error)
func (*TransactionsGroupMetadata) MarshalToSizedBuffer ¶
func (m *TransactionsGroupMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TransactionsGroupMetadata) ProtoMessage ¶
func (*TransactionsGroupMetadata) ProtoMessage()
func (*TransactionsGroupMetadata) Reset ¶
func (m *TransactionsGroupMetadata) Reset()
func (*TransactionsGroupMetadata) Size ¶
func (m *TransactionsGroupMetadata) Size() (n int)
func (*TransactionsGroupMetadata) String ¶
func (this *TransactionsGroupMetadata) String() string
func (*TransactionsGroupMetadata) Unmarshal ¶
func (m *TransactionsGroupMetadata) Unmarshal(dAtA []byte) error
func (*TransactionsGroupMetadata) XXX_DiscardUnknown ¶
func (m *TransactionsGroupMetadata) XXX_DiscardUnknown()
func (*TransactionsGroupMetadata) XXX_Marshal ¶
func (m *TransactionsGroupMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TransactionsGroupMetadata) XXX_Merge ¶
func (m *TransactionsGroupMetadata) XXX_Merge(src proto.Message)
func (*TransactionsGroupMetadata) XXX_Size ¶
func (m *TransactionsGroupMetadata) XXX_Size() int
func (*TransactionsGroupMetadata) XXX_Unmarshal ¶
func (m *TransactionsGroupMetadata) XXX_Unmarshal(b []byte) error