Skip to content

Commit

Permalink
Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
greymistcube committed Jan 2, 2024
1 parent 6876527 commit a515e22
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ be compatible with this version, specifically, those that ran with
- (Libplanet.Store) Removed `BaseNode`. [[#3574]]
- (Libplanet.Store) Added `ITrie.Remove()` interface method. [[#3576]]
- (Libplanet.Store) Added `FullNode.RemoveChild()` method. [[#3576]]
- (Libplanet.Action) Added `IAccount.RemoveState()` interface method.
[[#3577]]

[#3559]: https://github.com/planetarium/libplanet/pull/3559
[#3560]: https://github.com/planetarium/libplanet/pull/3560
Expand All @@ -51,6 +53,7 @@ be compatible with this version, specifically, those that ran with
[#3573]: https://github.com/planetarium/libplanet/pull/3573
[#3574]: https://github.com/planetarium/libplanet/pull/3574
[#3576]: https://github.com/planetarium/libplanet/pull/3576
[#3577]: https://github.com/planetarium/libplanet/pull/3577


Version 3.9.2
Expand Down
2 changes: 2 additions & 0 deletions Libplanet.Action/State/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public Account(
[Pure]
public IAccount SetState(Address address, IValue state) => UpdateState(address, state);

/// <inheritdoc/>
[Pure]
public IAccount RemoveState(Address address) => UpdateState(address, null);

/// <inheritdoc/>
Expand Down
15 changes: 15 additions & 0 deletions Libplanet.Action/State/IAccount.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ public interface IAccount : IAccountState
[Pure]
IAccount SetState(Address address, IValue state);

/// <summary>
/// Gets a new instance that the account state of the given
/// <paramref name="address"/> is removed.
/// </summary>
/// <param name="address">The <see cref="Address"/> referring
/// the account to remove its state.</param>
/// <returns>A new <see cref="IAccount"/> instance that
/// the account state of the given <paramref name="address"/>
/// is removed.</returns>
/// <remarks>
/// This method method does not manipulate the instance,
/// but returns a new <see cref="IAccount"/> instance
/// with updated states instead.
/// </remarks>
[Pure]
IAccount RemoveState(Address address);

/// <summary>
Expand Down

0 comments on commit a515e22

Please sign in to comment.