Documentation
¶
Index ¶
- Variables
- func NewLevelDB(file string, cache int, handles int) (*leveldb.DB, error)
- type ChainDB
- func (c *ChainDB) AddBatchVotesMsg(votes types.ProposalSignatures) error
- func (c *ChainDB) AddExecuteMsg(transfer types.TransferMsg) error
- func (c *ChainDB) AddProposalMsg(transfer types.TransferMsg) error
- func (c *ChainDB) AddSignReq(transfer types.TransferMsg) error
- func (c *ChainDB) GetBatchVotesById(chainId uint8, id uint64) (*types.ProposalSignatures, error)
- func (c *ChainDB) GetExecuteMsgById(chainId uint8, id uint64) (*types.TransferMsg, error)
- func (c *ChainDB) GetLastBatchVotesId(chainId uint8, account string) (uint64, error)
- func (c *ChainDB) GetLastExecuteId(chainId uint8, account string) (uint64, error)
- func (c *ChainDB) GetLastSignId(chainId uint8, account string) (uint64, error)
- func (c *ChainDB) GetLastVoteId(chainId uint8, account string) (uint64, error)
- func (c *ChainDB) GetNextPollBlockNum(chainId uint8, account string) (uint64, error)
- func (c *ChainDB) GetProposalMsgById(chainId uint8, id uint64) (*types.TransferMsg, error)
- func (c *ChainDB) GetSignReqById(id uint64) (*types.TransferMsg, error)
- func (c *ChainDB) UpdateLastBatchVotesId(chainId uint8, account string, blockNumber uint64) error
- func (c *ChainDB) UpdateLastExecuteId(chainId uint8, account string, blockNumber uint64) error
- func (c *ChainDB) UpdateLastSignId(chainId uint8, account string, blockNumber uint64) error
- func (c *ChainDB) UpdateLastVoteId(chainId uint8, account string, blockNumber uint64) error
- func (c *ChainDB) UpdateNextPollBlockNum(chainId uint8, account string, blockNumber uint64) error
- type Properties
- type StorageSize
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LAST_POLL_BLOCK_NUM = "LAST_POLL_BLOCK_NUM_%s_%d" LAST_VOTE_QUEUE_ID = "LAST_VOTE_QUEUE_ID_%s_%d" LAST_SIGN_QUEUE_ID = "LAST_SIGN_QUEUE_ID_%s_%d" LAST_EXECUTE_QUEUE_ID = "LAST_EXECUTE_QUEUE_ID_%s_%d" LAST_BATCHVOTES_QUEUE_ID = "LAST_BATCHVOTES_QUEUE_ID_%s_%d" )
View Source
var ( DESTINATION_PROPOSAL_MSG = "DESTINATION_PROPOSAL_MSG_%d" COLLECTOR_SIGN_REQ = "COLLECTOR_SIGN_REQ_%d" DESTINATION_EXECUTE_MSG = "DESTINATION_EXECUTE_MSG_%d" DESTINATION_BATCH_VOTES_MSG = "DESTINATION_BATCH_VOTES_MSG_%d" )
Functions ¶
Types ¶
type ChainDB ¶
type ChainDB struct { Properties *Properties Msg *queue.PrefixQueue CollectorChainId uint8 // contains filtered or unexported fields }
func (*ChainDB) AddBatchVotesMsg ¶
func (c *ChainDB) AddBatchVotesMsg(votes types.ProposalSignatures) error
func (*ChainDB) AddExecuteMsg ¶
func (c *ChainDB) AddExecuteMsg(transfer types.TransferMsg) error
func (*ChainDB) AddProposalMsg ¶
func (c *ChainDB) AddProposalMsg(transfer types.TransferMsg) error
func (*ChainDB) AddSignReq ¶
func (c *ChainDB) AddSignReq(transfer types.TransferMsg) error
func (*ChainDB) GetBatchVotesById ¶
func (*ChainDB) GetExecuteMsgById ¶
func (*ChainDB) GetLastBatchVotesId ¶
func (*ChainDB) GetLastExecuteId ¶
func (*ChainDB) GetLastSignId ¶
func (*ChainDB) GetLastVoteId ¶
func (*ChainDB) GetNextPollBlockNum ¶
func (*ChainDB) GetProposalMsgById ¶
func (*ChainDB) GetSignReqById ¶
func (c *ChainDB) GetSignReqById(id uint64) (*types.TransferMsg, error)
func (*ChainDB) UpdateLastBatchVotesId ¶
func (*ChainDB) UpdateLastExecuteId ¶
func (*ChainDB) UpdateLastSignId ¶
func (*ChainDB) UpdateLastVoteId ¶
type Properties ¶
func (*Properties) Delete ¶
func (p *Properties) Delete(key []byte) error
Delete deletes the key from the queue and database
type StorageSize ¶
type StorageSize float64
func (StorageSize) String ¶
func (s StorageSize) String() string
String implements the stringer interface.
Click to show internal directories.
Click to hide internal directories.