Skip to content

Commit

Permalink
Update code: apply libplanet
Browse files Browse the repository at this point in the history
  • Loading branch information
U-lis committed Dec 16, 2024
1 parent 22aca92 commit 5b5fcdb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Libplanet.Headless/Hosting/LibplanetNodeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ IActionEvaluator BuildActionEvaluator(IActionEvaluatorConfiguration actionEvalua
ConsensusPrivateKey = Properties.ConsensusPrivateKey,
ConsensusWorkers = 500,
TargetBlockInterval = TimeSpan.FromMilliseconds(Properties.ConsensusTargetBlockIntervalMilliseconds ?? 7000),
ContextTimeoutOptions = Properties.ContextTimeoutOption,
ContextOption = Properties.ContextOption,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class LibplanetNodeServiceProperties

public TimeSpan TipTimeout { get; set; } = TimeSpan.FromSeconds(60);

public ContextTimeoutOption ContextTimeoutOption { get; set; }
public ContextOption ContextOption { get; set; }

public int DemandBuffer { get; set; } = 1150;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public static LibplanetNodeServiceProperties
var peers = peerStrings.Select(PropertyParser.ParsePeer).ToImmutableArray();
var consensusSeeds = consensusSeedStrings?.Select(PropertyParser.ParsePeer).ToImmutableList();

var consensusContextTimeoutOption = consensusProposeSecondBase.HasValue
? new ContextTimeoutOption(consensusProposeSecondBase.Value)
: new ContextTimeoutOption();
var consensusContextOption = consensusProposeSecondBase.HasValue
? new ContextOption(consensusProposeSecondBase.Value)
: new ContextOption();

return new LibplanetNodeServiceProperties
{
Expand Down Expand Up @@ -147,7 +147,7 @@ public static LibplanetNodeServiceProperties
ConsensusSeeds = consensusSeeds,
ConsensusPrivateKey = consensusPrivateKey,
ConsensusTargetBlockIntervalMilliseconds = consensusTargetBlockIntervalMilliseconds,
ContextTimeoutOption = consensusContextTimeoutOption,
ContextOption = consensusContextOption,
ActionEvaluatorConfiguration = actionEvaluatorConfiguration ?? new DefaultActionEvaluatorConfiguration(),
};
}
Expand Down

0 comments on commit 5b5fcdb

Please sign in to comment.