Interface IAccountStateDelta
An interface to manipulate account states with maintaining the set of UpdatedAddresses.
It is like a map which is virtually initialized such
that every possible Address exists and
is mapped to null
. That means that:
Namespace: Libplanet.Action
Assembly: Libplanet.dll
Syntax
public interface IAccountStateDelta
Remarks
This interface is immutable. SetState(Address, IValue) method does not manipulate the instance, but returns a new IAccountStateDelta instance with updated states.
Properties
| Improve this Doc View SourceUpdatedAddresses
Addresses of the accounts that have been updated since then.
Declaration
IImmutableSet<Address> UpdatedAddresses { get; }
Property Value
Type | Description |
---|---|
IImmutableSet<Address> |
Methods
| Improve this Doc View SourceGetState(Address)
Gets the account state of the given address
.
Declaration
IValue GetState(Address address)
Parameters
Type | Name | Description |
---|---|---|
Address | address | The Address referring the account to get its state. |
Returns
Type | Description |
---|---|
IValue | The account state of the given |
SetState(Address, IValue)
Gets a new instance that the account state of the given
address
is set to the given
state
.
Declaration
IAccountStateDelta SetState(Address address, IValue state)
Parameters
Type | Name | Description |
---|---|---|
Address | address | The Address referring the account to set its state. |
IValue | state | The new state to fill the account with. |
Returns
Type | Description |
---|---|
IAccountStateDelta | A new IAccountStateDelta instance that
the account state of the given |
Remarks
This method method does not manipulate the instance, but returns a new IAccountStateDelta instance with updated states instead.