Versions in this module Expand all Collapse all v0 v0.2.2 Feb 19, 2019 Changes in this version + const DefaultMaxDataSize + const FieldBool + const FieldBytes + const FieldIn64 + const FieldInt + const FieldInt32 + const FieldString + const FieldUint16 + const FieldUint168 + const FieldUint256 + const FieldUint32 + const FieldUint64 + const FieldUint8 + func BytesToUint64(b []byte) uint64 + func BytesToUint64List(b []byte) ([]uint64, error) + func GetIndexKey(tableName string, index uint64, columnValue []byte) []byte + func GetRowKey(tableName string, rowID uint64) []byte + func GetTableIDKey(tableName string) []byte + func GetTableKey(tableName string) []byte + func Uint64ListToBytes(indexes []uint64) ([]byte, error) + func Uint64ToBytes(value uint64) []byte + type Arbitrators interface + ForceChange func() error + GetArbitrators func() [][]byte + GetArbitratorsProgramHashes func() []*common.Uint168 + GetCandidates func() [][]byte + GetCandidatesProgramHashes func() []*common.Uint168 + GetNextArbitrators func() [][]byte + GetNextCandidates func() [][]byte + GetNextOnDutyArbitrator func(offset uint32) []byte + GetOnDutyArbitrator func() []byte + HasArbitersMajorityCount func(num uint32) bool + HasArbitersMinorityCount func(num uint32) bool + RegisterListener func(listener ArbitratorsListener) + StartUp func() error + UnregisterListener func(listener ArbitratorsListener) + type ArbitratorsListener interface + OnNewElection func(arbiters [][]byte) + type DBTable struct + Fields []string + Indexes []uint64 + Name string + PrimaryKey uint64 + func (d *DBTable) Column(fieldName string) uint64 + func (d *DBTable) Data(fields []*Field) ([]byte, error) + func (d *DBTable) Deserialize(r io.Reader) error + func (d *DBTable) GetFields(data []byte) ([]*Field, error) + func (d *DBTable) Serialize(w io.Writer) error + type DirectPeers struct + Address string + PublicKey []byte + Sequence uint32 + type Field struct + Name string + Value interface{} + func (f *Field) Data() []byte + type HeightVersions interface + AddBlock func(block *types.Block) (bool, bool, error) + AddDposBlock func(block *types.DposBlock) (bool, bool, error) + AssignCoinbaseTxRewards func(block *types.Block, totalReward common.Fixed64) error + CheckCoinbaseArbitratorsReward func(blockHeight uint32, coinbase *types.Transaction, ...) error + CheckCoinbaseMinerReward func(blockHeight uint32, tx *types.Transaction, totalReward common.Fixed64) error + CheckConfirmedBlockOnFork func(block *types.Block) error + CheckOutputPayload func(blockHeight uint32, tx *types.Transaction, output *types.Output) error + CheckOutputProgramHash func(blockHeight uint32, tx *types.Transaction, programHash common.Uint168) error + CheckTxHasNoPrograms func(blockHeight uint32, tx *types.Transaction) error + CheckVoteProducerOutputs func(blockHeight uint32, tx *types.Transaction, outputs []*types.Output, ...) error + GetDefaultBlockVersion func(blockHeight uint32) uint32 + GetDefaultTxVersion func(blockHeight uint32) byte + GetNextOnDutyArbitrator func(blockHeight, dutyChangedCount, offset uint32) []byte + GetProducersDesc func(block *types.Block) ([][]byte, error) + type IArbitratorsRecord interface + GetArbitrators func(a Arbitrators) error + GetDirectPeers func() ([]*DirectPeers, error) + SaveCurrentArbitrators func(a Arbitrators) + SaveDirectPeers func(peers []*DirectPeers) + SaveDposDutyChangedCount func(count uint32) + SaveNextArbitrators func(a Arbitrators) + type IDBBasic interface + Disconnect func() error + InitConnection func(connParams ...interface{}) error + type IDBOperator interface + Create func(table *DBTable) error + Insert func(table *DBTable, fields []*Field) (uint64, error) + Select func(table *DBTable, inputFields []*Field) ([][]*Field, error) + SelectID func(table *DBTable, inputFields []*Field) ([]uint64, error) + Update func(table *DBTable, inputFields []*Field, updateFields []*Field) ([]uint64, error) + type IDposStore interface + type IEventRecord interface + AddConsensusEvent func(event interface{}) error + AddProposalEvent func(event interface{}) error + AddViewEvent func(event interface{}) error + AddVoteEvent func(event interface{}) error + UpdateConsensusEvent func(event interface{}) error + UpdateProposalEvent func(event interface{}) error + type NewBlocksListener interface + OnBlockReceived func(b *types.Block, confirmed bool) + OnConfirmReceived func(p *types.DPosProposalVoteSlot)