/// </summary>
public class CBlock
{
+ /// <summary>
+ /// Maximum block size is 1Mb.
+ /// </summary>
+ public const uint nMaxBlockSize = 1000000;
+
+ /// <summary>
+ /// Sanity threshold for amount of sigops.
+ /// </summary>
+ public const uint nMaxSigOps = 20000;
+
/// <summary>
/// Block header.
/// </summary>
uint nSigOps = 0; // total sigops
// Basic sanity checkings
- if (vtx.Length == 0 || Size > 1000000)
+ if (vtx.Length == 0 || Size > nMaxBlockSize)
{
return false;
}
}
// Reject block if validation would consume too much resources.
- if (nSigOps > 50000)
+ if (nSigOps > nMaxSigOps)
{
return false;
}