Documentation ¶
Index ¶
- Constants
- type BatchWitness
- type Witness
- func (w *Witness) ComputeAccountHash(accountIndex uint32, highAccountIndex uint32, currentIndex uint32)
- func (w *Witness) ExecuteBatchCreateUser(accountIndex uint32, currentNumber uint32, ...)
- func (w *Witness) GetCexAssets(wit *BatchWitness) []utils.CexAssetInfo
- func (w *Witness) Run()
- func (w *Witness) WriteBatchWitnessToDB()
- type WitnessModel
Constants ¶
View Source
const ( StatusPublished = iota StatusReceived StatusFinished )
View Source
const (
TableNamePrefix = `witness`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchWitness ¶
type Witness ¶
type Witness struct {
// contains filtered or unexported fields
}
func NewWitness ¶
func NewWitness(accountTree bsmt.SparseMerkleTree, totalOpsNumber uint32, ops []utils.AccountInfo, cexAssets []utils.CexAssetInfo, config *config.Config) *Witness
func (*Witness) ComputeAccountHash ¶
func (*Witness) ExecuteBatchCreateUser ¶
func (w *Witness) ExecuteBatchCreateUser(accountIndex uint32, currentNumber uint32, batchCreateUserWit *utils.BatchCreateUserWitness)
func (*Witness) GetCexAssets ¶
func (w *Witness) GetCexAssets(wit *BatchWitness) []utils.CexAssetInfo
func (*Witness) WriteBatchWitnessToDB ¶
func (w *Witness) WriteBatchWitnessToDB()
type WitnessModel ¶
type WitnessModel interface { CreateBatchWitnessTable() error DropBatchWitnessTable() error GetLatestBatchWitnessHeight() (height int64, err error) GetBatchWitnessByHeight(height int64) (witness *BatchWitness, err error) UpdateBatchWitnessStatus(witness *BatchWitness, status int64) error GetLatestBatchWitness() (witness *BatchWitness, err error) GetLatestBatchWitnessByStatus(status int64) (witness *BatchWitness, err error) CreateBatchWitness(witness []BatchWitness) error GetRowCounts() (count []int64, err error) }
func NewWitnessModel ¶
func NewWitnessModel(db *gorm.DB, suffix string) WitnessModel
Click to show internal directories.
Click to hide internal directories.