Documentation
¶
Index ¶
- Constants
- func DeleteOldGasStats(db *gorm.DB, timeout uint64) error
- func DeleteOldOperations(db *gorm.DB, timeout uint64, status string, kinds ...string) error
- func GetModelsBy(kinds ...string) []interface{}
- func MempoolIndexName(network string) string
- func OpenDatabaseConnection(cfg config.Database, kinds ...string) (*gorm.DB, error)
- func Rollback(db *gorm.DB, network, branch string, level uint64, kinds ...string) error
- func SetExpired(db *gorm.DB, network, branch string, kinds ...string) error
- func SetInChain(db *gorm.DB, network, hash, kind string, level uint64) error
- type ActivateAccount
- type Ballot
- type Delegation
- type DoubleBaking
- type DoubleBakingInfo
- type DoubleEndorsing
- type DoubleEndorsingOperations
- type Endorsement
- type GasStats
- type MempoolOperation
- type NonceRevelation
- type Origination
- type Proposal
- type RegisterGlobalConstant
- type Reveal
- type Transaction
Constants ¶
View Source
const ( StatusApplied = "applied" StatusBranchDelayed = "branch_delayed" StatusBranchRefused = "branch_refused" StatusRefused = "refused" StatusInChain = "in_chain" StatusExpired = "expired" )
Statuses
View Source
const (
IndexTypeMempool = "mempool"
)
Variables ¶
This section is empty.
Functions ¶
func DeleteOldGasStats ¶
DeleteOldGasStats -
func DeleteOldOperations ¶
DeleteOldOperations -
func OpenDatabaseConnection ¶
OpenDatabaseConnection -
func SetExpired ¶
SetExpired -
Types ¶
type ActivateAccount ¶
type ActivateAccount struct {
MempoolOperation
Pkh string `json:"pkh"`
Secret string `json:"secret"`
}
ActivateAccount -
type Ballot ¶
type Ballot struct {
MempoolOperation
Period int64 `json:"period"`
Ballot string `json:"ballot"`
}
Ballot -
type Delegation ¶
type Delegation struct {
MempoolOperation
Fee int64 `json:"fee,string"`
Counter int64 `gorm:"primaryKey" json:"counter,string"`
GasLimit int64 `json:"gas_limit,string"`
StorageLimit int64 `json:"storage_limit,string"`
Delegate string `json:",omitempty"`
Source string `json:"source,omitempty" gorm:"delegation_source_idx"`
}
Delegation -
type DoubleBaking ¶
type DoubleBaking struct {
MempoolOperation
Bh1 DoubleBakingInfo `json:"bh1" gorm:"-"`
Bh2 DoubleBakingInfo `json:"bh2" gorm:"-"`
Bh1Level uint64 `json:"-" gorm:"column:bh_1_level"`
Bh1Proto int64 `json:"-" gorm:"column:bh_1_proto"`
Bh1ValidationPass int64 `json:"-" gorm:"column:bh_1_validation_pass"`
Bh1Priority int64 `json:"-" gorm:"column:bh_1_priority"`
Bh1ProofOfWorkNonce string `json:"-" gorm:"column:bh_1_proof_of_work_nonce"`
Bh2Level uint64 `json:"-" gorm:"column:bh_2_level"`
Bh2Proto int64 `json:"-" gorm:"column:bh_2_proto"`
Bh2ValidationPass int64 `json:"-" gorm:"column:bh_2_validation_pass"`
Bh2Priority int64 `json:"-" gorm:"column:bh_2_priority"`
Bh2ProofOfWorkNonce string `json:"-" gorm:"column:bh_2_proof_of_work_nonce"`
}
DoubleBaking -
type DoubleBakingInfo ¶
type DoubleBakingInfo struct {
Level uint64 `json:"level"`
Proto int64 `json:"proto"`
ValidationPass int64 `json:"validation_pass"`
Fitness []string `json:"fitness"`
Priority int64 `json:"priority"`
ProofOfWorkNonce string `json:"proof_of_work_nonce"`
}
DoubleBakingInfo -
type DoubleEndorsing ¶
type DoubleEndorsing struct {
MempoolOperation
Op1Kind string `json:"-" gorm:"column:op_1_kind"`
Op1Level uint64 `json:"-" gorm:"column:op_1_level"`
Op2Kind string `json:"-" gorm:"column:op_2_kind"`
Op2Level uint64 `json:"-" gorm:"column:op_2_level"`
Op1 struct {
Operations DoubleEndorsingOperations `json:"operations"`
} `json:"op1" gorm:"-"`
Op2 struct {
Operations DoubleEndorsingOperations `json:"operations"`
} `json:"op2" gorm:"-"`
}
DoubleEndorsing -
type DoubleEndorsingOperations ¶
DoubleEndorsingOperations -
type Endorsement ¶
type Endorsement struct {
MempoolOperation
Level uint64 `json:"level"`
Baker string `json:"-" gorm:"transaction_baker_idx"`
}
Endorsement -
func EndorsementsWithoutBaker ¶
func EndorsementsWithoutBaker(tx *gorm.DB) (endorsements []Endorsement, err error)
EndorsementsWithoutBaker -
type GasStats ¶
type GasStats struct {
Network string `gorm:"primaryKey" json:"network"`
Hash string `gorm:"primaryKey" json:"hash"`
TotalGasUsed uint64 `gorm:"column:total_gas_used" json:"total_gas_used"`
TotalFee uint64 `gorm:"column:total_fee" json:"total_fee"`
UpdatedAt int `gorm:"autoUpdateTime" json:"updated_at"`
LevelInMempool uint64 `json:"level_in_mempool"`
LevelInChain uint64 `json:"level_in_chain"`
}
GasStats -
type MempoolOperation ¶
type MempoolOperation struct {
CreatedAt int `gorm:"autoCreateTime"`
UpdatedAt int `gorm:"autoUpdateTime"`
Network string `gorm:"primaryKey" json:"network"`
Hash string `gorm:"primaryKey" json:"hash"`
Branch string `json:"branch"`
Status string `json:"status"`
Kind string `json:"kind"`
Signature string `json:"signature"`
Protocol string `json:"protocol"`
Level uint64 `json:"level"`
Errors datatypes.JSON `json:"errors,omitempty"`
ExpirationLevel *uint64 `json:"expiration_level"`
Raw datatypes.JSON `json:"raw,omitempty"`
}
MempoolOperation -
type NonceRevelation ¶
type NonceRevelation struct {
MempoolOperation
Level int `json:"level"`
Nonce string `json:"nonce"`
}
NonceRevelation -
type Origination ¶
type Origination struct {
MempoolOperation
Fee int64 `json:"fee,string"`
Counter int64 `gorm:"primaryKey" json:"counter,string"`
GasLimit int64 `json:"gas_limit,string"`
StorageLimit int64 `json:"storage_limit,string"`
Balance string `json:"balance"`
Delegate string `json:",omitempty"`
Source string `json:"source,omitempty" gorm:"origination_source_idx"`
Script struct {
Storage json.RawMessage `json:"storage"`
} `json:"script" gorm:"-"`
Storage datatypes.JSON `json:"-"`
}
Origination -
type Proposal ¶
type Proposal struct {
MempoolOperation
Period int64 `json:"period"`
Proposals string `json:"proposal"`
}
Proposal -
type RegisterGlobalConstant ¶
type RegisterGlobalConstant struct {
MempoolOperation
Source string `json:"source"`
Fee string `json:"fee"`
Counter string `json:"counter"`
GasLimit string `json:"gas_limit"`
StorageLimit string `json:"storage_limit"`
Value datatypes.JSON `json:"value"`
}
RegisterGlobalConstant -
func (RegisterGlobalConstant) TableName ¶
func (RegisterGlobalConstant) TableName() string
TableName -
type Reveal ¶
type Reveal struct {
MempoolOperation
Source string `json:"source" gorm:"reveal_source_idx"`
Fee int64 `json:"fee,string"`
Counter int64 `gorm:"primaryKey" json:"counter,string"`
GasLimit int64 `json:"gas_limit,string"`
StorageLimit int64 `json:"storage_limit,string"`
PublicKey string `json:"public_key"`
}
Reveal -
type Transaction ¶
type Transaction struct {
MempoolOperation
Source string `json:"source" gorm:"transaction_source_idx"`
Fee int64 `json:"fee,string"`
Counter int64 `gorm:"primaryKey" json:"counter,string"`
GasLimit int64 `json:"gas_limit,string"`
StorageLimit int64 `json:"storage_limit,string"`
Amount string `json:"amount"`
Destination string `json:"destination" gorm:"transaction_destination_idx"`
Parameters datatypes.JSON `json:"parameters,omitempty"`
}
Transaction -
Click to show internal directories.
Click to hide internal directories.