Documentation ¶
Index ¶
- func AddrListDbDeserialize(buf []byte) ([]types.Address, error)
- func AddrListDbSerialize(addrList []types.Address) ([]byte, error)
- type ContractCallerList
- func (cList *ContractCallerList) AddNewTx(block *ledger.AccountBlock)
- func (cList *ContractCallerList) AddTotalNum()
- func (cList *ContractCallerList) GetCurrentIndex() int
- func (cList *ContractCallerList) GetNextTx() *ledger.AccountBlock
- func (cList *ContractCallerList) Len() int
- func (cList *ContractCallerList) SubTotalNum()
- func (cList *ContractCallerList) TxRemain() int
- type OnroadAccountInfo
- type OnroadBlocksPool
- func (p *OnroadBlocksPool) AcquireFullOnroadBlocksCache(addr types.Address)
- func (p *OnroadBlocksPool) AcquireOnroadSortedContractCache(addr types.Address)
- func (p *OnroadBlocksPool) AddCommonTxLis(addr types.Address, f func())
- func (p *OnroadBlocksPool) AddContractLis(gid types.Gid, f func(address types.Address))
- func (p *OnroadBlocksPool) Close() error
- func (p *OnroadBlocksPool) DeleteContractCache(gid types.Gid)
- func (p *OnroadBlocksPool) DeleteDirect(sendBlock *ledger.AccountBlock) error
- func (p *OnroadBlocksPool) GetContractCallerList(addr types.Address) *ContractCallerList
- func (p *OnroadBlocksPool) GetNextCommonTx(addr types.Address) *ledger.AccountBlock
- func (p *OnroadBlocksPool) GetNextContractTx(addr types.Address) *ledger.AccountBlock
- func (p *OnroadBlocksPool) GetOnroadAccountInfo(addr types.Address) (*OnroadAccountInfo, error)
- func (p *OnroadBlocksPool) NewSignalToWorker(block *ledger.AccountBlock)
- func (p *OnroadBlocksPool) ReleaseContractCache(addr types.Address)
- func (p *OnroadBlocksPool) ReleaseFullOnroadBlocksCache(addr types.Address) error
- func (p *OnroadBlocksPool) RemoveCommonTxLis(addr types.Address)
- func (p *OnroadBlocksPool) RemoveContractLis(gid types.Gid)
- func (p *OnroadBlocksPool) ResetCacheCursor(addr types.Address)
- func (p *OnroadBlocksPool) RevertOnroad(batch *leveldb.Batch, subLedger map[types.Address][]*ledger.AccountBlock) error
- func (p *OnroadBlocksPool) RevertOnroadSuccess(subLedger map[types.Address][]*ledger.AccountBlock)
- func (p *OnroadBlocksPool) WriteOnroad(batch *leveldb.Batch, blockList []*vm_context.VmAccountBlock) error
- func (p *OnroadBlocksPool) WriteOnroadSuccess(blocks []*vm_context.VmAccountBlock)
- type OnroadMeta
- type OnroadSet
- func (ucf *OnroadSet) DeleteMeta(batch *leveldb.Batch, addr *types.Address, hash *types.Hash) error
- func (ucf *OnroadSet) GetContractAddrList(gid *types.Gid) ([]types.Address, error)
- func (ucf *OnroadSet) GetCountByAddress(addr *types.Address) (count uint64, err error)
- func (ucf *OnroadSet) GetHashList(addr *types.Address) (hashs []*types.Hash, err error)
- func (ucf *OnroadSet) GetHashsByCount(count uint64, addr *types.Address) (hashs []*types.Hash, err error)
- func (ucf *OnroadSet) WriteGidAddrList(batch *leveldb.Batch, gid *types.Gid, addrList []types.Address) error
- func (ucf *OnroadSet) WriteMeta(batch *leveldb.Batch, addr *types.Address, hash *types.Hash) error
- type TokenBalanceInfo
- type UAccess
- func (access *UAccess) DeleteContractAddrFromGid(batch *leveldb.Batch, gid types.Gid, address types.Address) error
- func (access *UAccess) GetAllOnroadBlocks(addr types.Address) (blockList []*ledger.AccountBlock, err error)
- func (access *UAccess) GetCommonAccInfo(addr *types.Address) (info *OnroadAccountInfo, err error)
- func (access *UAccess) GetCommonAccTokenInfoMap(addr *types.Address) (map[types.TokenTypeId]*TokenBalanceInfo, uint64, error)
- func (access *UAccess) GetContractAddrListByGid(gid *types.Gid) ([]types.Address, error)
- func (access *UAccess) GetOnroadBlocks(index, num, count uint64, addr *types.Address) (blockList []*ledger.AccountBlock, err error)
- func (access *UAccess) GetOnroadHashs(index, num, count uint64, addr *types.Address) ([]*types.Hash, error)
- func (access *UAccess) Init(chain chain.Chain)
- func (access *UAccess) WriteContractAddrToGid(batch *leveldb.Batch, gid types.Gid, address types.Address) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContractCallerList ¶ added in v1.2.0
type ContractCallerList struct {
// contains filtered or unexported fields
}
func (*ContractCallerList) AddNewTx ¶ added in v1.2.0
func (cList *ContractCallerList) AddNewTx(block *ledger.AccountBlock)
func (*ContractCallerList) AddTotalNum ¶ added in v1.2.0
func (cList *ContractCallerList) AddTotalNum()
func (*ContractCallerList) GetCurrentIndex ¶ added in v1.2.0
func (cList *ContractCallerList) GetCurrentIndex() int
func (*ContractCallerList) GetNextTx ¶ added in v1.2.0
func (cList *ContractCallerList) GetNextTx() *ledger.AccountBlock
func (*ContractCallerList) Len ¶ added in v1.2.0
func (cList *ContractCallerList) Len() int
func (*ContractCallerList) SubTotalNum ¶ added in v1.2.0
func (cList *ContractCallerList) SubTotalNum()
func (*ContractCallerList) TxRemain ¶ added in v1.2.0
func (cList *ContractCallerList) TxRemain() int
type OnroadAccountInfo ¶
type OnroadAccountInfo struct { AccountAddress *types.Address TotalNumber uint64 TokenBalanceInfoMap map[types.TokenTypeId]*TokenBalanceInfo // contains filtered or unexported fields }
type OnroadBlocksPool ¶
type OnroadBlocksPool struct {
// contains filtered or unexported fields
}
obtaining the account info from cache or db and manage the cache lifecycle
func NewOnroadBlocksPool ¶
func NewOnroadBlocksPool(dbAccess *UAccess) *OnroadBlocksPool
func (*OnroadBlocksPool) AcquireFullOnroadBlocksCache ¶
func (p *OnroadBlocksPool) AcquireFullOnroadBlocksCache(addr types.Address)
func (*OnroadBlocksPool) AcquireOnroadSortedContractCache ¶ added in v1.2.0
func (p *OnroadBlocksPool) AcquireOnroadSortedContractCache(addr types.Address)
func (*OnroadBlocksPool) AddCommonTxLis ¶
func (p *OnroadBlocksPool) AddCommonTxLis(addr types.Address, f func())
func (*OnroadBlocksPool) AddContractLis ¶
func (p *OnroadBlocksPool) AddContractLis(gid types.Gid, f func(address types.Address))
func (*OnroadBlocksPool) Close ¶
func (p *OnroadBlocksPool) Close() error
func (*OnroadBlocksPool) DeleteContractCache ¶ added in v1.2.0
func (p *OnroadBlocksPool) DeleteContractCache(gid types.Gid)
func (*OnroadBlocksPool) DeleteDirect ¶
func (p *OnroadBlocksPool) DeleteDirect(sendBlock *ledger.AccountBlock) error
func (*OnroadBlocksPool) GetContractCallerList ¶ added in v1.2.0
func (p *OnroadBlocksPool) GetContractCallerList(addr types.Address) *ContractCallerList
func (*OnroadBlocksPool) GetNextCommonTx ¶
func (p *OnroadBlocksPool) GetNextCommonTx(addr types.Address) *ledger.AccountBlock
func (*OnroadBlocksPool) GetNextContractTx ¶ added in v1.2.0
func (p *OnroadBlocksPool) GetNextContractTx(addr types.Address) *ledger.AccountBlock
func (*OnroadBlocksPool) GetOnroadAccountInfo ¶
func (p *OnroadBlocksPool) GetOnroadAccountInfo(addr types.Address) (*OnroadAccountInfo, error)
func (*OnroadBlocksPool) NewSignalToWorker ¶
func (p *OnroadBlocksPool) NewSignalToWorker(block *ledger.AccountBlock)
func (*OnroadBlocksPool) ReleaseContractCache ¶ added in v1.2.0
func (p *OnroadBlocksPool) ReleaseContractCache(addr types.Address)
func (*OnroadBlocksPool) ReleaseFullOnroadBlocksCache ¶
func (p *OnroadBlocksPool) ReleaseFullOnroadBlocksCache(addr types.Address) error
func (*OnroadBlocksPool) RemoveCommonTxLis ¶
func (p *OnroadBlocksPool) RemoveCommonTxLis(addr types.Address)
func (*OnroadBlocksPool) RemoveContractLis ¶
func (p *OnroadBlocksPool) RemoveContractLis(gid types.Gid)
func (*OnroadBlocksPool) ResetCacheCursor ¶
func (p *OnroadBlocksPool) ResetCacheCursor(addr types.Address)
func (*OnroadBlocksPool) RevertOnroad ¶
func (p *OnroadBlocksPool) RevertOnroad(batch *leveldb.Batch, subLedger map[types.Address][]*ledger.AccountBlock) error
RevertOnroad means to revert according to bifurcation
func (*OnroadBlocksPool) RevertOnroadSuccess ¶
func (p *OnroadBlocksPool) RevertOnroadSuccess(subLedger map[types.Address][]*ledger.AccountBlock)
func (*OnroadBlocksPool) WriteOnroad ¶
func (p *OnroadBlocksPool) WriteOnroad(batch *leveldb.Batch, blockList []*vm_context.VmAccountBlock) error
func (*OnroadBlocksPool) WriteOnroadSuccess ¶
func (p *OnroadBlocksPool) WriteOnroadSuccess(blocks []*vm_context.VmAccountBlock)
type OnroadSet ¶
type OnroadSet struct {
// contains filtered or unexported fields
}
func NewOnroadSet ¶
func (*OnroadSet) DeleteMeta ¶
func (*OnroadSet) GetContractAddrList ¶
func (*OnroadSet) GetCountByAddress ¶
func (*OnroadSet) GetHashList ¶
func (*OnroadSet) GetHashsByCount ¶
func (*OnroadSet) WriteGidAddrList ¶
type TokenBalanceInfo ¶
type UAccess ¶
func NewUAccess ¶
func NewUAccess() *UAccess
func (*UAccess) DeleteContractAddrFromGid ¶
func (*UAccess) GetAllOnroadBlocks ¶
func (*UAccess) GetCommonAccInfo ¶
func (access *UAccess) GetCommonAccInfo(addr *types.Address) (info *OnroadAccountInfo, err error)
func (*UAccess) GetCommonAccTokenInfoMap ¶
func (access *UAccess) GetCommonAccTokenInfoMap(addr *types.Address) (map[types.TokenTypeId]*TokenBalanceInfo, uint64, error)
func (*UAccess) GetContractAddrListByGid ¶
func (*UAccess) GetOnroadBlocks ¶
func (*UAccess) GetOnroadHashs ¶
Click to show internal directories.
Click to hide internal directories.