Module snapps_txn_reference_impl::update_logic [−][src]
Expand description
The logic for applying the updates contained in a party.
Functions
Returns true if all of the updates are SetOrKeep::Set
, false otherwise.
Returns true if any of the updates are SetOrKeep::Set
, false otherwise.
Update the balance
field of account::Account
by adding the balance_change
from
party::PartyUpdate
using party::wrapping_add_signed
.
Update the delegate
field of account::Account
with the new value from the
party::PartyUpdate
.
Increment the nonce
field of account::Account
if the increment_nonce
argument is true;
otherwise, leave the account unchanged.
Update the permissions
field of account::Account
with the new value from the
party::PartyUpdate
.
Update the sequence_event
field of account::SnappAccount
with the new sequence events at
the given global slot (since genesis).
Update the snapp
field of account::Account
with a party::PartyUpdate
and a
sequence_event::SequenceEvents
.
Update the app_state
field of account::SnappAccount
with the new value from the
party::PartyUpdate
.
Update the proved_state
field of account::SnappAccount
with the new computed value.
Update the account::SnappAccount
with a party::PartyUpdate
and a
sequence_event::SequenceEvents
.
Update the timing
field of account::Account
with the new value from the
party::PartyUpdate
.
Update the token_symbol
field of account::SnappAccount
with the new value from the
party::PartyUpdate
.
Update the account::Account
with a party::PartyUpdate
and a
sequence_event::SequenceEvents
.
Update the uri
field of account::SnappAccount
with the new value from the
party::PartyUpdate
.
Update the verification_key
field of account::SnappAccount
with the new value from the
party::PartyUpdate
.
Update the voting_for
field of account::Account
with the new value from the
party::PartyUpdate
.
Compute the update for the app state, by applying set_or_keep
to each pair of values from
the original and the update:
Compute the new value, given the original value and a SetOrKeep
update.
If the update is Keep
, return the original value.
If the value is Set(new_value)
, return new_value
.
Convert a SetOrKeep<account::TimingInfo>
in an account::AccountTiming::Timed
.
If the value is Keep
, return Keep
.
Otherwise, if the value is Set(timing_info)
, return
Set(account::AccountTiming::Timed(timing_info)
.