From 3d82f6864a58407921755fb0673aef83e025101b Mon Sep 17 00:00:00 2001 From: dangershony Date: Tue, 2 Jun 2020 12:31:43 +0100 Subject: [PATCH] Create a DefaultMaxBlockSigopsCost to make it more clear when acting on that field --- src/External/NBitcoin/ConsensusOptions.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/External/NBitcoin/ConsensusOptions.cs b/src/External/NBitcoin/ConsensusOptions.cs index cb689dd2b..2001d99be 100644 --- a/src/External/NBitcoin/ConsensusOptions.cs +++ b/src/External/NBitcoin/ConsensusOptions.cs @@ -8,6 +8,8 @@ namespace NBitcoin /// public class ConsensusOptions { + private const int DefaultMaxBlockSigopsCost = 80000; + /// /// Flag used to detect SegWit transactions. /// @@ -46,13 +48,13 @@ public class ConsensusOptions public int MaxStandardTxWeight { get; set; } = 400000; /// The maximum allowed number of signature check operations in a block (network rule). - public int MaxBlockSigopsCost { get; set; } = 80000; + public int MaxBlockSigopsCost { get; set; } = DefaultMaxBlockSigopsCost; /// The maximum number of sigops we're willing to relay/mine in a single tx. /// /// This value is calculated based on dived by 5. /// - public int MaxStandardTxSigopsCost { get; set; } = 80000 / 5; // MaxBlockSigopsCost / 5 + public int MaxStandardTxSigopsCost { get; set; } = DefaultMaxBlockSigopsCost / 5; /// Block Height at which the node should enforce the use of . /// Can be set to zero to indicate that the minimum supported protocol version will not change depending on the block height.