Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump/libplanet 3.6.0 #239

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions NineChronicles.Snapshot.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libplanet", "libplanet\Libp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libplanet.RocksDBStore", "libplanet\Libplanet.RocksDBStore\Libplanet.RocksDBStore.csproj", "{A87BF80A-6B59-4E13-9330-826394294DFA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libplanet.Action", "libplanet\Libplanet.Action\Libplanet.Action.csproj", "{70D0513D-55C0-4A6B-8186-3F8C5E7C6D65}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libplanet.Common", "libplanet\Libplanet.Common\Libplanet.Common.csproj", "{3422BA20-1571-4CCC-ABD1-E3FBEB77A7B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libplanet.Crypto", "libplanet\Libplanet.Crypto\Libplanet.Crypto.csproj", "{B22E9ECE-6B02-4D34-B504-DBB17E700983}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libplanet.Types", "libplanet\Libplanet.Types\Libplanet.Types.csproj", "{49CC98D6-8B5C-4CB9-8CC7-F50582D59B9F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Libplanet.Store", "libplanet\Libplanet.Store\Libplanet.Store.csproj", "{9BD055DB-8523-4D86-BE1B-F67CEF537EBF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -24,5 +34,25 @@ Global
{A87BF80A-6B59-4E13-9330-826394294DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A87BF80A-6B59-4E13-9330-826394294DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A87BF80A-6B59-4E13-9330-826394294DFA}.Release|Any CPU.Build.0 = Release|Any CPU
{70D0513D-55C0-4A6B-8186-3F8C5E7C6D65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70D0513D-55C0-4A6B-8186-3F8C5E7C6D65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70D0513D-55C0-4A6B-8186-3F8C5E7C6D65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70D0513D-55C0-4A6B-8186-3F8C5E7C6D65}.Release|Any CPU.Build.0 = Release|Any CPU
{3422BA20-1571-4CCC-ABD1-E3FBEB77A7B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3422BA20-1571-4CCC-ABD1-E3FBEB77A7B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3422BA20-1571-4CCC-ABD1-E3FBEB77A7B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3422BA20-1571-4CCC-ABD1-E3FBEB77A7B2}.Release|Any CPU.Build.0 = Release|Any CPU
{B22E9ECE-6B02-4D34-B504-DBB17E700983}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B22E9ECE-6B02-4D34-B504-DBB17E700983}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B22E9ECE-6B02-4D34-B504-DBB17E700983}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B22E9ECE-6B02-4D34-B504-DBB17E700983}.Release|Any CPU.Build.0 = Release|Any CPU
{49CC98D6-8B5C-4CB9-8CC7-F50582D59B9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{49CC98D6-8B5C-4CB9-8CC7-F50582D59B9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{49CC98D6-8B5C-4CB9-8CC7-F50582D59B9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{49CC98D6-8B5C-4CB9-8CC7-F50582D59B9F}.Release|Any CPU.Build.0 = Release|Any CPU
{9BD055DB-8523-4D86-BE1B-F67CEF537EBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BD055DB-8523-4D86-BE1B-F67CEF537EBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BD055DB-8523-4D86-BE1B-F67CEF537EBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BD055DB-8523-4D86-BE1B-F67CEF537EBF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
12 changes: 7 additions & 5 deletions NineChronicles.Snapshot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Libplanet;
using Libplanet.Action;
using Libplanet.Action.Loader;
using Libplanet.Blocks;
using Libplanet.Types.Blocks;
using Libplanet.RocksDBStore;
using Libplanet.Store;
using Libplanet.Store.Trie;
Expand All @@ -19,6 +19,8 @@
using Libplanet.Blockchain;
using Libplanet.Blockchain.Policies;
using Libplanet.Blockchain.Renderers.Debug;
using Libplanet.Common;
using Libplanet.Crypto;
using Microsoft.Extensions.Configuration;
using Serilog;
using ILogger = Serilog.ILogger;
Expand Down Expand Up @@ -149,9 +151,9 @@
var blockChainStates = new BlockChainStates(_store, _stateStore);
var actionEvaluator = new ActionEvaluator(
_ => blockPolicy.BlockAction,
blockChainStates,
new NCActionLoader(),
null);
_stateStore,
new NCActionLoader()
);
var originalChain = new BlockChain(blockPolicy, stagePolicy, _store, _stateStore, _store.GetBlock(genesisHash), blockChainStates, actionEvaluator);
var tip = _store.GetBlock(tipHash);

Expand Down Expand Up @@ -216,7 +218,7 @@
}

snapshotTipHash = hash;
} while (!_stateStore.ContainsStateRoot(_store.GetBlock(snapshotTipHash).StateRootHash));
} while (!_stateStore.GetStateRoot(_store.GetBlock(snapshotTipHash).StateRootHash).Recorded);

var forkedId = Guid.NewGuid();
Fork(chainId, forkedId, snapshotTipHash, tip);
Expand Down Expand Up @@ -690,7 +692,7 @@

public class NCActionLoader : IActionLoader
{
private readonly IActionLoader _actionLoader;

Check warning on line 695 in NineChronicles.Snapshot/Program.cs

View workflow job for this annotation

GitHub Actions / build

Field 'Program.NCActionLoader._actionLoader' is never assigned to, and will always have its default value null

Check warning on line 695 in NineChronicles.Snapshot/Program.cs

View workflow job for this annotation

GitHub Actions / build

Field 'Program.NCActionLoader._actionLoader' is never assigned to, and will always have its default value null
public IAction LoadAction(long index, IValue value) => _actionLoader.LoadAction(index, value);
}
}
Expand Down
2 changes: 1 addition & 1 deletion libplanet
Submodule libplanet updated 624 files
Loading