Documentation ¶
Index ¶
- func AddCredit(id types.UnitID, owner state.Predicate, data *FeeCreditRecord) state.Action
- func DecrCredit(id types.UnitID, value uint64) state.Action
- func DelCredit(id types.UnitID) state.Action
- func IncrCredit(id types.UnitID, value uint64, timeout uint64, transactionRecordHash []byte) state.Action
- type FeeCreditRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecrCredit ¶
DecrCredit decrements the balance of given FeeCreditRecord
Types ¶
type FeeCreditRecord ¶
type FeeCreditRecord struct { Balance uint64 // current balance Hash []byte // hash of the last “add fee credit” transaction that incremented the balance of this record Timeout uint64 // the earliest round number when this record may be “garbage collected” if the balance goes to zero }
FeeCreditRecord state tree unit data of fee credit records. Holds fee credit balance for individual users, not to be confused with fee credit bills which contain aggregate fees for a given partition.
func (*FeeCreditRecord) Copy ¶
func (b *FeeCreditRecord) Copy() state.UnitData
func (*FeeCreditRecord) GetHash ¶
func (b *FeeCreditRecord) GetHash() []byte
func (*FeeCreditRecord) SummaryValueInput ¶
func (b *FeeCreditRecord) SummaryValueInput() uint64
func (*FeeCreditRecord) Write ¶
func (b *FeeCreditRecord) Write(hasher hash.Hash)
Click to show internal directories.
Click to hide internal directories.