Skip to content

Commit

Permalink
customize maxtransactionperblock
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Mar 21, 2024
1 parent 0c8ec46 commit 0d4e2ec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Lib9c.Policy/Policy/BlockPolicySource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,20 @@ namespace Nekoyume.Blockchain.Policy
{
public partial class BlockPolicySource
{
public const int MaxTransactionsPerBlock = 200;
public static int MaxTransactionsPerBlock;

public const int DefaultMaxTransactionsPerBlock = 200;

public static readonly TimeSpan BlockInterval = TimeSpan.FromSeconds(8);

private readonly IActionLoader _actionLoader;

public BlockPolicySource(IActionLoader? actionLoader = null)
public BlockPolicySource(
IActionLoader? actionLoader = null,
int? maxTransactionPerBlock = null)
{
_actionLoader = actionLoader ?? new NCActionLoader();
MaxTransactionsPerBlock = maxTransactionPerBlock ?? DefaultMaxTransactionsPerBlock;
}

/// <summary>
Expand Down

0 comments on commit 0d4e2ec

Please sign in to comment.