Documentation ¶
Index ¶
Constants ¶
View Source
const ( PayloadTypeAddFeeCredit = "addFC" PayloadTypeCloseFeeCredit = "closeFC" PayloadTypeReclaimFeeCredit = "reclFC" PayloadTypeTransferFeeCredit = "transFC" PayloadTypeLockFeeCredit = "lockFC" PayloadTypeUnlockFeeCredit = "unlockFC" )
Variables ¶
This section is empty.
Functions ¶
func IsFeeCreditTx ¶
func IsFeeCreditTx(tx *types.TransactionOrder) bool
Types ¶
type AddFeeCreditAttributes ¶
type AddFeeCreditAttributes struct { FeeCreditOwnerCondition []byte // target fee credit record owner condition FeeCreditTransfer *types.TransactionRecord // bill transfer record of type "transfer fee credit" FeeCreditTransferProof *types.TxProof // transaction proof of "transfer fee credit" transaction // contains filtered or unexported fields }
type FeeCreditRecord ¶
type FeeCreditRecord struct { Balance uint64 `json:"balance,string"` // current balance Counter uint64 `json:"counter,string"` // transaction counter; incremented with reach “addFC”, "closeFC", "lockFC" or "unlockFC" transaction; spending fee credit does not change this value Timeout uint64 `json:"timeout,string"` // the earliest round number when this record may be “garbage collected” if the balance goes to zero Locked uint64 `json:"locked,string"` // lock status of the fee credit record, non-zero value means locked; locked free credit does not prevent spending the fee credit // contains filtered or unexported fields }
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() types.UnitData
func (*FeeCreditRecord) GetCounter ¶
func (b *FeeCreditRecord) GetCounter() uint64
func (*FeeCreditRecord) IsLocked ¶
func (b *FeeCreditRecord) IsLocked() bool
func (*FeeCreditRecord) SummaryValueInput ¶
func (b *FeeCreditRecord) SummaryValueInput() uint64
type LockFeeCreditAttributes ¶
type ReclaimFeeCreditAttributes ¶
type ReclaimFeeCreditAttributes struct { CloseFeeCreditTransfer *types.TransactionRecord // bill transfer record of type "close fee credit" CloseFeeCreditProof *types.TxProof // transaction proof of "close fee credit" transaction Counter uint64 // the transaction counter of this unit // contains filtered or unexported fields }
type TransferFeeCreditAttributes ¶
type TransferFeeCreditAttributes struct { Amount uint64 // amount to transfer TargetSystemIdentifier types.SystemID // system_identifier of the target partition TargetRecordID []byte // unit id of the corresponding “add fee credit” transaction EarliestAdditionTime uint64 // earliest round when the corresponding “add fee credit” transaction can be executed in the target system LatestAdditionTime uint64 // latest round when the corresponding “add fee credit” transaction can be executed in the target system TargetUnitCounter *uint64 // the transaction counter of the target unit, or nil if the record does not exist yet Counter uint64 // the transaction counter of this unit // contains filtered or unexported fields }
type UnlockFeeCreditAttributes ¶
type UnlockFeeCreditAttributes struct { Counter uint64 // the transaction counter of the target unit // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.