diff --git a/.Lib9c.Benchmarks/Program.cs b/.Lib9c.Benchmarks/Program.cs index e3a5231bc5..596a89b98a 100644 --- a/.Lib9c.Benchmarks/Program.cs +++ b/.Lib9c.Benchmarks/Program.cs @@ -152,7 +152,7 @@ static void Main(string[] args) Console.WriteLine("Total elapsed\t{0}", ended - started); } - // Copied from BlockChain.SetStates(). + // Copied from BlockChain.DetermineBlockStateRootHash(). private static void SetStates( Guid chainId, IStore store, @@ -162,18 +162,12 @@ private static void SetStates( bool buildStateReferences ) { - IImmutableSet
stateUpdatedAddresses = actionEvaluations - .SelectMany(a => a.OutputState.Delta.StateUpdatedAddresses) - .ToImmutableHashSet(); - IImmutableSet<(Address, Currency)> updatedFungibleAssets = actionEvaluations - .SelectMany(a => a.OutputState.Delta.UpdatedFungibleAssets) - .ToImmutableHashSet(); + IImmutableDictionary totalDelta = actionEvaluations.GetRawTotalDelta(); if (!stateStore.ContainsStateRoot(block.StateRootHash)) { HashDigest? prevStateRootHash = store.GetStateRootHash(block.PreviousHash); - var totalDelta = GetTotalDelta(actionEvaluations, ToStateKey, ToFungibleAssetKey); - stateStore.Commit(prevStateRootHash, totalDelta); + ITrie stateRoot = stateStore.Commit(prevStateRootHash, totalDelta); } } diff --git a/.Libplanet b/.Libplanet index 6a4005d9c5..a987187212 160000 --- a/.Libplanet +++ b/.Libplanet @@ -1 +1 @@ -Subproject commit 6a4005d9c54b5f043d14a6adfa26be6b86f0c33c +Subproject commit a987187212c0fd2aea272fe3a12bb3c27697fde3