Skip to content

Commit

Permalink
Adopt GetPolicy() changes
Browse files Browse the repository at this point in the history
  • Loading branch information
longfin committed Feb 2, 2024
1 parent a441d53 commit f76d712
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Lib9c
13 changes: 1 addition & 12 deletions NineChronicles.Headless/NineChroniclesNodeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,18 +257,7 @@ StandaloneContext context
}

internal static IBlockPolicy GetBlockPolicy(Planet planet, IActionLoader actionLoader)
{
var source = new BlockPolicySource(actionLoader);
return planet switch
{
Planet.Odin => source.GetPolicy(),
Planet.OdinInternal => source.GetInternalPolicy(),
_ => throw new ArgumentException(
$"Can't retrieve policy for given planet ({planet})",
nameof(planet)
),
};
}
=> new BlockPolicySource(actionLoader).GetPolicy(planet);

public Task<bool> CheckPeer(string addr) => NodeService?.CheckPeer(addr) ?? throw new InvalidOperationException();

Expand Down

0 comments on commit f76d712

Please sign in to comment.