Documentation ¶
Index ¶
- Constants
- func CheckLedger(chain Chain, genesisSnapshotBlock *ledger.SnapshotBlock, ...) (byte, error)
- func CheckSum(accountBlocks []*interfaces.VmAccountBlock) types.Hash
- func InitLedger(chain Chain, genesisSnapshotBlock *ledger.SnapshotBlock, ...) error
- func NewGenesisAccountBlocks(cfg *config.Genesis) []*interfaces.VmAccountBlock
- func NewGenesisSnapshotBlock(accountBlocks []*interfaces.VmAccountBlock) *ledger.SnapshotBlock
- func UpdateDexFundOwner(cfg *config.Genesis)
- func VmBlocksToHashMap(accountBlocks []*interfaces.VmAccountBlock) map[types.Hash]struct{}
- type Chain
- type SortBalances
- type SortVmBlocks
Constants ¶
View Source
const ( LedgerUnknown = byte(0) LedgerEmpty = byte(1) LedgerValid = byte(2) LedgerInvalid = byte(3) )
Variables ¶
This section is empty.
Functions ¶
func CheckLedger ¶
func CheckLedger(chain Chain, genesisSnapshotBlock *ledger.SnapshotBlock, genesisAccountBlocks []*interfaces.VmAccountBlock) (byte, error)
func CheckSum ¶
func CheckSum(accountBlocks []*interfaces.VmAccountBlock) types.Hash
func InitLedger ¶
func InitLedger(chain Chain, genesisSnapshotBlock *ledger.SnapshotBlock, vmBlocks []*interfaces.VmAccountBlock) error
func NewGenesisAccountBlocks ¶
func NewGenesisAccountBlocks(cfg *config.Genesis) []*interfaces.VmAccountBlock
func NewGenesisSnapshotBlock ¶
func NewGenesisSnapshotBlock(accountBlocks []*interfaces.VmAccountBlock) *ledger.SnapshotBlock
func UpdateDexFundOwner ¶
func VmBlocksToHashMap ¶
func VmBlocksToHashMap(accountBlocks []*interfaces.VmAccountBlock) map[types.Hash]struct{}
Types ¶
type Chain ¶
type Chain interface { InsertSnapshotBlock(snapshotBlock *ledger.SnapshotBlock) (invalidAccountBlocks []*ledger.AccountBlock, err error) InsertAccountBlock(vmAccountBlocks *interfaces.VmAccountBlock) error QuerySnapshotBlockByHeight(uint64) (*ledger.SnapshotBlock, error) GetContentNeedSnapshot() ledger.SnapshotContent WriteGenesisCheckSum(hash types.Hash) error QueryGenesisCheckSum() (*types.Hash, error) }
type SortBalances ¶
type SortBalances []struct {
// contains filtered or unexported fields
}
func (SortBalances) Len ¶
func (a SortBalances) Len() int
func (SortBalances) Less ¶
func (a SortBalances) Less(i, j int) bool
func (SortBalances) Swap ¶
func (a SortBalances) Swap(i, j int)
type SortVmBlocks ¶
type SortVmBlocks []*interfaces.VmAccountBlock
func (SortVmBlocks) Len ¶
func (a SortVmBlocks) Len() int
func (SortVmBlocks) Less ¶
func (a SortVmBlocks) Less(i, j int) bool
func (SortVmBlocks) Swap ¶
func (a SortVmBlocks) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.