• Design
  • API Reference
  • Changelog
  • Contribute
Show / Hide Table of Contents
  • Libplanet
    • Address
    • AddressExtension
    • ByteUtil
    • Hashcash
    • Hashcash.Stamp
    • HashDigest<T>
    • HashDigestExtension
    • Nonce
  • Libplanet.Action
    • AccountStateGetter
    • ActionEvaluation<T>
    • ActionTypeAttribute
    • AddressStateMap
    • IAccountStateDelta
    • IAction
    • IActionContext
    • IRandom
    • MissingActionTypeException
    • PolymorphicAction<T>
  • Libplanet.Blockchain
    • BlockChain<T>
  • Libplanet.Blockchain.Policies
    • BlockPolicy<T>
    • BlockPolicyExtension
    • IBlockPolicy<T>
  • Libplanet.Blocks
    • Block<T>
    • InvalidBlockDifficultyException
    • InvalidBlockException
    • InvalidBlockHashException
    • InvalidBlockIndexException
    • InvalidBlockNonceException
    • InvalidBlockPreviousHashException
    • InvalidBlockTimestampException
  • Libplanet.Crypto
    • InvalidCiphertextException
    • PrivateKey
    • PublicKey
    • SymmetricKey
  • Libplanet.Net
    • BlockDownloadState
    • DifferentAppProtocolVersionException
    • DifferentProtocolVersionEventArgs
    • IceServer
    • IceServerException
    • InvalidMessageException
    • NoSwarmContextException
    • Peer
    • PeerNotFoundException
    • PeerSetDelta
    • Swarm
    • SwarmException
  • Libplanet.Serialization
    • BencodexFormatter<T>
    • SerializationInfoExtension
  • Libplanet.Store
    • BaseIndex<TKey, TVal>
    • BaseStore
    • BlockSet<T>
    • FileStore
    • IStore
    • NamespaceNotFoundException
    • TransactionSet<T>
  • Libplanet.Tx
    • InvalidTxException
    • InvalidTxIdException
    • InvalidTxNonceException
    • InvalidTxPublicKeyException
    • InvalidTxSignatureException
    • InvalidTxUpdatedAddressesException
    • Transaction<T>
    • TxId
    • UnexpectedlyTerminatedTxRehearsalException

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:

  • it does not have length,
  • its index getter never throws KeyNotFoundException, but returns null instead, and
  • filling an Address with null state cannot be distinguished from the Address having never been set to any state.
Namespace: Libplanet.Action
Assembly: Libplanet.dll
Syntax
public interface IAccountStateDelta
Remarks

This interface is immutable. SetState(Address, Object) method does not manipulate the instance, but returns a new IAccountStateDelta instance with updated states.

Properties

| Improve this Doc View Source

UpdatedAddresses

Addresses of the accounts that have been updated since then.

Declaration
[Pure]
IImmutableSet<Address> UpdatedAddresses { get; }
Property Value
Type Description
IImmutableSet<Address>

Methods

| Improve this Doc View Source

GetState(Address)

Gets the account state of the given address.

Declaration
[Pure]
object GetState(Address address)
Parameters
Type Name Description
Address address

The Address referring the account to get its state.

Returns
Type Description
Object

The account state of the given address. If it has never been set to any state it returns null instead.

| Improve this Doc View Source

SetState(Address, Object)

Gets a new instance that the account state of the given address is set to the given state.

Declaration
[Pure]
IAccountStateDelta SetState(Address address, object state)
Parameters
Type Name Description
Address address

The Address referring the account to set its state.

Object state

The new state to fill the account with.

Returns
Type Description
IAccountStateDelta

A new IAccountStateDelta instance that the account state of the given address is set to the given state.

Remarks

This method method does not manipulate the instance, but returns a new IAccountStateDelta instance with updated states instead.

  • Improve this Doc
  • View Source
Back to top Copyright © 2019 Planetarium
Generated by DocFX