Type Alias pallet_gear_gas::pallet::NodeOf
source · pub type NodeOf<T> = GasNode<<T as Config>::AccountId, Key, Balance, Funds>;
Aliased Type§
enum NodeOf<T> {
External {
id: <T as Config>::AccountId,
multiplier: GasMultiplier<u128, u64>,
value: u64,
lock: NodeLock<u64>,
system_reserve: u64,
refs: ChildrenRefs,
consumed: bool,
deposit: bool,
},
Cut {
id: <T as Config>::AccountId,
multiplier: GasMultiplier<u128, u64>,
value: u64,
lock: NodeLock<u64>,
},
Reserved {
id: <T as Config>::AccountId,
multiplier: GasMultiplier<u128, u64>,
value: u64,
lock: NodeLock<u64>,
refs: ChildrenRefs,
consumed: bool,
},
SpecifiedLocal {
parent: GasNodeId<MessageId, ReservationId>,
root: GasNodeId<MessageId, ReservationId>,
value: u64,
lock: NodeLock<u64>,
system_reserve: u64,
refs: ChildrenRefs,
consumed: bool,
},
UnspecifiedLocal {
parent: GasNodeId<MessageId, ReservationId>,
root: GasNodeId<MessageId, ReservationId>,
lock: NodeLock<u64>,
system_reserve: u64,
},
}
Variants§
External
A root node for each gas tree.
Usually created when a new gasful logic started (i.e., message sent).
Cut
A node created by “cutting” value from some other tree node.
Such node types are detached and aren’t part of the tree structure (not node’s parent, not node’s child).
Fields
id: <T as Config>::AccountId
Reserved
A node used for gas reservation feature.
Such node types are detached from initial tree and may act the a root of new tree.
SpecifiedLocal
A node, which is a part of the tree structure, that can be a parent and/or a child.
As well as External
node, it has an internal balance and can exist
while being consumed (see [Tree::consume
] for details).
However, it has a parent
field pointing to the node,
from which that one was created.
Fields
parent: GasNodeId<MessageId, ReservationId>
root: GasNodeId<MessageId, ReservationId>
refs: ChildrenRefs
UnspecifiedLocal
Pretty same as SpecifiedLocal
, but doesn’t have internal balance,
so relies on its parent
.
Such nodes don’t have children references.