-
Notifications
You must be signed in to change notification settings - Fork 34
/
policy.go
41 lines (30 loc) · 1.32 KB
/
policy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package mining
import (
"github.com/copernet/copernicus/net/wire"
"github.com/copernet/copernicus/util"
)
const (
/*MaxTxSigOpsCount allowed number of signature check operations per transaction. */
MaxTxSigOpsCount uint64 = 20000
/*DefaultMaxGeneratedBlockSize default for -blockMaxsize, which controls the maximum size of block the
* mining code will create **/
DefaultMaxGeneratedBlockSize uint64 = 2 * util.OneMegaByte
//DefaultMaxBlockSize = 32 * OneMegaByte
DefaultMaxBlockSize = wire.MaxBlockPayload
/*DefaultBlockPrioritySize default for -blockPrioritySize, maximum space for zero/low-fee transactions*/
DefaultBlockPrioritySize uint64 = 0
/*DefaultBlockMinTxFee default for -blockMinTxFee, which sets the minimum feeRate for a transaction
* in blocks created by mining code **/
DefaultBlockMinTxFee uint = 1000
/*MaxStandardTxSize the maximum size for transactions we're willing to relay/mine */
MaxStandardTxSize uint = 100000
/*MaxP2SHSigOps maximum number of signature check operations in an IsStandard() P2SH script*/
MaxP2SHSigOps uint = 15
/*MaxStandardTxSigOps the maximum number of sigops we're willing to relay/mine in a single tx */
MaxStandardTxSigOps = uint(MaxTxSigOpsCount / 5)
DefaultTransactionMaxfee = util.COIN / 10
)
// global value in mining module
var (
MaxTxFee = DefaultTransactionMaxfee
)