Documentation
¶
Index ¶
- Variables
- type Block
- func (*Block) Descriptor() ([]byte, []int)deprecated
- func (x *Block) GetAcceptedTime() int64
- func (x *Block) GetBlockNumber() uint64
- func (x *Block) GetEventCommitment() []byte
- func (x *Block) GetEventCount() uint64
- func (x *Block) GetGlobalStateRoot() []byte
- func (x *Block) GetHash() []byte
- func (x *Block) GetOldRoot() []byte
- func (x *Block) GetParentBlockHash() []byte
- func (x *Block) GetSequencerAddress() []byte
- func (x *Block) GetStatus() string
- func (x *Block) GetTimeStamp() int64
- func (x *Block) GetTxCommitment() []byte
- func (x *Block) GetTxCount() uint64
- func (x *Block) GetTxHashes() [][]byte
- func (*Block) ProtoMessage()
- func (x *Block) ProtoReflect() protoreflect.Message
- func (x *Block) Reset()
- func (x *Block) String() string
- type Manager
Constants ¶
This section is empty.
Variables ¶
View Source
var File_block_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
BlockNumber uint64 `protobuf:"varint,2,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"`
ParentBlockHash []byte `protobuf:"bytes,3,opt,name=parentBlockHash,proto3" json:"parentBlockHash,omitempty"`
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
SequencerAddress []byte `protobuf:"bytes,5,opt,name=sequencerAddress,proto3" json:"sequencerAddress,omitempty"`
GlobalStateRoot []byte `protobuf:"bytes,6,opt,name=globalStateRoot,proto3" json:"globalStateRoot,omitempty"`
OldRoot []byte `protobuf:"bytes,7,opt,name=oldRoot,proto3" json:"oldRoot,omitempty"`
AcceptedTime int64 `protobuf:"varint,8,opt,name=acceptedTime,proto3" json:"acceptedTime,omitempty"`
TimeStamp int64 `protobuf:"varint,9,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"`
TxCount uint64 `protobuf:"varint,10,opt,name=txCount,proto3" json:"txCount,omitempty"`
TxCommitment []byte `protobuf:"bytes,11,opt,name=txCommitment,proto3" json:"txCommitment,omitempty"`
EventCount uint64 `protobuf:"varint,12,opt,name=eventCount,proto3" json:"eventCount,omitempty"`
EventCommitment []byte `protobuf:"bytes,13,opt,name=eventCommitment,proto3" json:"eventCommitment,omitempty"`
TxHashes [][]byte `protobuf:"bytes,14,rep,name=TxHashes,proto3" json:"TxHashes,omitempty"`
// contains filtered or unexported fields
}
func (*Block) Descriptor
deprecated
func (*Block) GetAcceptedTime ¶
func (*Block) GetBlockNumber ¶
func (*Block) GetEventCommitment ¶
func (*Block) GetEventCount ¶
func (*Block) GetGlobalStateRoot ¶
func (*Block) GetOldRoot ¶
func (*Block) GetParentBlockHash ¶
func (*Block) GetSequencerAddress ¶
func (*Block) GetTimeStamp ¶
func (*Block) GetTxCommitment ¶
func (*Block) GetTxCount ¶
func (*Block) GetTxHashes ¶
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
func (*Block) ProtoReflect ¶
func (x *Block) ProtoReflect() protoreflect.Message
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is a Block database manager to save and search the blocks.
func NewManager ¶
NewManager returns a new Block manager using the given database.
func (*Manager) GetBlockByHash ¶
GetBlockByHash search the block with the given block hash. If the block does not exist then returns nil. If any error happens, then panic.
func (*Manager) GetBlockByNumber ¶
GetBlockByNumber search the block with the given block number. If the block does not exist then returns nil. If any error happens, then panic.
Click to show internal directories.
Click to hide internal directories.