Documentation ¶
Index ¶
- func NewGenesisVmDB(address *types.Address) *vmDb
- func NewNoContextVmDb(chain Chain) *vmDb
- func NewVmDb(chain Chain, address *types.Address, latestSnapshotBlockHash *types.Hash, ...) (*vmDb, error)
- func NewVmDbByAddr(chain Chain, address *types.Address) *vmDb
- type Chain
- type Unsaved
- func (unsaved *Unsaved) AddLog(log *ledger.VmLog)
- func (unsaved *Unsaved) GetBalance(tokenTypeId *types.TokenTypeId) (*big.Int, bool)
- func (unsaved *Unsaved) GetBalanceMap() map[types.TokenTypeId]*big.Int
- func (unsaved *Unsaved) GetCode() []byte
- func (unsaved *Unsaved) GetContractMeta(addr types.Address) *ledger.ContractMeta
- func (unsaved *Unsaved) GetLogList() ledger.VmLogList
- func (unsaved *Unsaved) GetLogListHash(snapshotBlockHeight uint64, address types.Address, prevHash types.Hash) *types.Hash
- func (unsaved *Unsaved) GetStorage() [][2][]byte
- func (unsaved *Unsaved) GetValue(key []byte) ([]byte, bool)
- func (unsaved *Unsaved) IsDelete(key []byte) bool
- func (unsaved *Unsaved) NewStorageIterator(prefix []byte) interfaces.StorageIterator
- func (unsaved *Unsaved) ReleaseRuntime()
- func (unsaved *Unsaved) Reset()
- func (unsaved *Unsaved) SetBalance(tokenTypeId *types.TokenTypeId, amount *big.Int)
- func (unsaved *Unsaved) SetCode(code []byte)
- func (unsaved *Unsaved) SetContractMeta(addr types.Address, contractMeta *ledger.ContractMeta)
- func (unsaved *Unsaved) SetValue(key []byte, value []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGenesisVmDB ¶
func NewNoContextVmDb ¶
func NewNoContextVmDb(chain Chain) *vmDb
func NewVmDbByAddr ¶
Types ¶
type Chain ¶
type Chain interface { GetQuotaUsedList(address types.Address) []types.QuotaInfo GetGlobalQuota() types.QuotaInfo GetBalance(addr types.Address, tokenId types.TokenTypeId) (*big.Int, error) GetContractCode(contractAddr types.Address) ([]byte, error) GetContractMeta(contractAddress types.Address) (meta *core.ContractMeta, err error) GetConfirmSnapshotHeaderByAbHash(abHash types.Hash) (*core.SnapshotBlock, error) GetConfirmedTimes(blockHash types.Hash) (uint64, error) GetContractMetaInSnapshot(contractAddress types.Address, snapshotHeight uint64) (meta *core.ContractMeta, err error) GetSnapshotHeaderByHash(hash types.Hash) (*core.SnapshotBlock, error) GetSnapshotBlockByHeight(height uint64) (*core.SnapshotBlock, error) GetAccountBlockByHash(blockHash types.Hash) (*core.AccountBlock, error) GetLatestAccountBlock(addr types.Address) (*core.AccountBlock, error) GetVmLogList(logHash *types.Hash) (core.VmLogList, error) GetUnconfirmedBlocks(addr types.Address) []*core.AccountBlock GetGenesisSnapshotBlock() *core.SnapshotBlock GetStakeBeneficialAmount(addr types.Address) (*big.Int, error) GetStorageIterator(address types.Address, prefix []byte) (interfaces.StorageIterator, error) GetValue(addr types.Address, key []byte) ([]byte, error) GetCallDepth(sendBlockHash types.Hash) (uint16, error) GetSnapshotBlockByContractMeta(addr types.Address, fromHash types.Hash) (*core.SnapshotBlock, error) GetSeedConfirmedSnapshotBlock(addr types.Address, fromHash types.Hash) (*core.SnapshotBlock, error) GetSeed(limitSb *core.SnapshotBlock, fromHash types.Hash) (uint64, error) }
type Unsaved ¶
type Unsaved struct {
// contains filtered or unexported fields
}
func NewUnsaved ¶
func NewUnsaved() *Unsaved
func (*Unsaved) GetBalance ¶
func (*Unsaved) GetBalanceMap ¶
func (unsaved *Unsaved) GetBalanceMap() map[types.TokenTypeId]*big.Int
func (*Unsaved) GetContractMeta ¶
func (unsaved *Unsaved) GetContractMeta(addr types.Address) *ledger.ContractMeta
func (*Unsaved) GetLogList ¶
func (*Unsaved) GetLogListHash ¶
func (*Unsaved) GetStorage ¶
func (*Unsaved) NewStorageIterator ¶
func (unsaved *Unsaved) NewStorageIterator(prefix []byte) interfaces.StorageIterator
func (*Unsaved) ReleaseRuntime ¶
func (unsaved *Unsaved) ReleaseRuntime()
func (*Unsaved) SetBalance ¶
func (unsaved *Unsaved) SetBalance(tokenTypeId *types.TokenTypeId, amount *big.Int)
func (*Unsaved) SetContractMeta ¶
func (unsaved *Unsaved) SetContractMeta(addr types.Address, contractMeta *ledger.ContractMeta)
Click to show internal directories.
Click to hide internal directories.