Documentation ¶
Index ¶
- func LoadDB() db.DB
- func New() *memory
- func NewDB(db db.DB) *memory
- type AccountCache
- func (ac AccountCache) UpdateAccount(account statedb.Account) AccountCache
- func (as AccountCache) UpdateCurrentExtBalanceByKey(key string, val *big.Int) AccountCache
- func (ac AccountCache) UpdateCurrentExtHERBalance(lchb *big.Int) AccountCache
- func (as AccountCache) UpdateIsFirstEntryByKey(key string, val bool) AccountCache
- func (ac AccountCache) UpdateIsFirstHER(isFirst bool) AccountCache
- func (as AccountCache) UpdateIsNewAmountUpdateByKey(key string, val bool) AccountCache
- func (ac AccountCache) UpdateIsNewHERAmountUpdate(isnew bool) AccountCache
- func (as AccountCache) UpdateLastExtBalanceByKey(key string, val *big.Int) AccountCache
- func (ac AccountCache) UpdateLastExtHERBalance(lehb *big.Int) AccountCache
- type BalanceStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountCache ¶
type AccountCache struct { Account statedb.Account LastExtHERBalance *big.Int CurrentExtHERBalance *big.Int IsFirstHEREntry bool IsNewHERAmountUpdate bool LastExtBalance map[string]*big.Int CurrentExtBalance map[string]*big.Int IsFirstEntry map[string]bool IsNewAmountUpdate map[string]bool }
AccountCache holds the balance detail of an Account that we need to use while updating balances of external assets
func (AccountCache) UpdateAccount ¶
func (ac AccountCache) UpdateAccount(account statedb.Account) AccountCache
func (AccountCache) UpdateCurrentExtBalanceByKey ¶
func (as AccountCache) UpdateCurrentExtBalanceByKey(key string, val *big.Int) AccountCache
func (AccountCache) UpdateCurrentExtHERBalance ¶
func (ac AccountCache) UpdateCurrentExtHERBalance(lchb *big.Int) AccountCache
func (AccountCache) UpdateIsFirstEntryByKey ¶
func (as AccountCache) UpdateIsFirstEntryByKey(key string, val bool) AccountCache
func (AccountCache) UpdateIsFirstHER ¶
func (ac AccountCache) UpdateIsFirstHER(isFirst bool) AccountCache
func (AccountCache) UpdateIsNewAmountUpdateByKey ¶
func (as AccountCache) UpdateIsNewAmountUpdateByKey(key string, val bool) AccountCache
func (AccountCache) UpdateIsNewHERAmountUpdate ¶
func (ac AccountCache) UpdateIsNewHERAmountUpdate(isnew bool) AccountCache
func (AccountCache) UpdateLastExtBalanceByKey ¶
func (as AccountCache) UpdateLastExtBalanceByKey(key string, val *big.Int) AccountCache
func (AccountCache) UpdateLastExtHERBalance ¶
func (ac AccountCache) UpdateLastExtHERBalance(lehb *big.Int) AccountCache
type BalanceStorage ¶
type BalanceStorage interface { Set(k string, x AccountCache) Get(k string) (AccountCache, bool) GetAll() map[string]AccountCache Close() }
Click to show internal directories.
Click to hide internal directories.