pub struct TxWithChanges {
pub tx: Transaction,
pub protocol_components: HashMap<ComponentId, ProtocolComponent>,
pub account_deltas: HashMap<Address, AccountDelta>,
pub state_updates: HashMap<ComponentId, ProtocolComponentStateDelta>,
pub balance_changes: HashMap<ComponentId, HashMap<Address, ComponentBalance>>,
pub account_balance_changes: HashMap<Address, HashMap<Address, AccountBalance>>,
pub entrypoints: HashMap<ComponentId, HashSet<EntryPoint>>,
pub entrypoint_params: HashMap<EntryPointId, HashSet<(TracingParams, Option<ComponentId>)>>,
}Expand description
Changes grouped by their respective transaction.
Fields§
§tx: Transaction§protocol_components: HashMap<ComponentId, ProtocolComponent>§account_deltas: HashMap<Address, AccountDelta>§state_updates: HashMap<ComponentId, ProtocolComponentStateDelta>§balance_changes: HashMap<ComponentId, HashMap<Address, ComponentBalance>>§account_balance_changes: HashMap<Address, HashMap<Address, AccountBalance>>§entrypoints: HashMap<ComponentId, HashSet<EntryPoint>>§entrypoint_params: HashMap<EntryPointId, HashSet<(TracingParams, Option<ComponentId>)>>Implementations§
Source§impl TxWithChanges
impl TxWithChanges
pub fn new( tx: Transaction, protocol_components: HashMap<ComponentId, ProtocolComponent>, account_deltas: HashMap<Address, AccountDelta>, protocol_states: HashMap<ComponentId, ProtocolComponentStateDelta>, balance_changes: HashMap<ComponentId, HashMap<Address, ComponentBalance>>, account_balance_changes: HashMap<Address, HashMap<Address, AccountBalance>>, entrypoints: HashMap<ComponentId, HashSet<EntryPoint>>, entrypoint_params: HashMap<EntryPointId, HashSet<(TracingParams, Option<ComponentId>)>>, ) -> Self
Sourcepub fn merge(&mut self, other: TxWithChanges) -> Result<(), MergeError>
pub fn merge(&mut self, other: TxWithChanges) -> Result<(), MergeError>
Merges this update with another one.
The method combines two TxWithChanges instances if they are on the same block.
NB: It is expected that other is a more recent update than self is and the two are
combined accordingly.
§Errors
Returns a MergeError if any of the above conditions are violated.
Trait Implementations§
Source§impl Clone for TxWithChanges
impl Clone for TxWithChanges
Source§fn clone(&self) -> TxWithChanges
fn clone(&self) -> TxWithChanges
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TxWithChanges
impl Debug for TxWithChanges
Source§impl DeepSizeOf for TxWithChanges
impl DeepSizeOf for TxWithChanges
Source§fn deep_size_of_children(&self, context: &mut Context) -> usize
fn deep_size_of_children(&self, context: &mut Context) -> usize
Returns an estimation of the heap-managed storage of this object.
This does not include the size of the object itself. Read more
Source§fn deep_size_of(&self) -> usize
fn deep_size_of(&self) -> usize
Returns an estimation of a total size of memory owned by the
object, including heap-managed storage. Read more
Source§impl Default for TxWithChanges
impl Default for TxWithChanges
Source§fn default() -> TxWithChanges
fn default() -> TxWithChanges
Returns the “default value” for a type. Read more
Source§impl From<AccountChangesWithTx> for TxWithChanges
impl From<AccountChangesWithTx> for TxWithChanges
Source§fn from(value: AccountChangesWithTx) -> Self
fn from(value: AccountChangesWithTx) -> Self
Converts to this type from the input type.
Source§impl From<ProtocolChangesWithTx> for TxWithChanges
impl From<ProtocolChangesWithTx> for TxWithChanges
Source§fn from(value: ProtocolChangesWithTx) -> Self
fn from(value: ProtocolChangesWithTx) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TxWithChanges
impl PartialEq for TxWithChanges
impl StructuralPartialEq for TxWithChanges
Auto Trait Implementations§
impl !Freeze for TxWithChanges
impl RefUnwindSafe for TxWithChanges
impl Send for TxWithChanges
impl Sync for TxWithChanges
impl Unpin for TxWithChanges
impl UnwindSafe for TxWithChanges
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more