Skip to content

Commit

Permalink
use DefaultMaxTransactionsPerBlock if maxTransactionPerBlock is greater
Browse files Browse the repository at this point in the history
  • Loading branch information
area363 committed Mar 21, 2024
1 parent 0d4e2ec commit 20d05c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib9c.Policy/Policy/BlockPolicySource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ public BlockPolicySource(
int? maxTransactionPerBlock = null)
{
_actionLoader = actionLoader ?? new NCActionLoader();
MaxTransactionsPerBlock = maxTransactionPerBlock ?? DefaultMaxTransactionsPerBlock;
MaxTransactionsPerBlock = Math.Min(
maxTransactionPerBlock ?? DefaultMaxTransactionsPerBlock,
DefaultMaxTransactionsPerBlock);
}

/// <summary>
Expand Down

0 comments on commit 20d05c7

Please sign in to comment.