Coverage Summary for Class: MiningConfig (co.rsk.config)
Class |
Class, %
|
Method, %
|
Line, %
|
MiningConfig |
0%
(0/1)
|
0%
(0/9)
|
0%
(0/17)
|
1 /*
2 * This file is part of RskJ
3 * Copyright (C) 2017 RSK Labs Ltd.
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 package co.rsk.config;
20
21 import co.rsk.core.RskAddress;
22
23 /**
24 * Wraps configuration for Mining, which is usually derived from configuration files.
25 */
26 public class MiningConfig {
27 public static final int REQUIRED_NUMBER_OF_BLOCKS_FOR_FORK_DETECTION_CALCULATION = 449;
28
29 private final RskAddress coinbaseAddress;
30 private final double minFeesNotifyInDollars;
31 private final double minerGasUnitInDollars;
32 private final long minGasPriceTarget;
33 private final int uncleListLimit;
34 private final int uncleGenerationLimit;
35 private final GasLimitConfig gasLimit;
36 private final boolean isFixedClock;
37
38 public MiningConfig(RskAddress coinbaseAddress, double minFeesNotifyInDollars, double minerGasUnitInDollars, long minGasPriceTarget, int uncleListLimit, int uncleGenerationLimit, GasLimitConfig gasLimit, boolean isFixedClock) {
39 this.coinbaseAddress = coinbaseAddress;
40 this.minFeesNotifyInDollars = minFeesNotifyInDollars;
41 this.minerGasUnitInDollars = minerGasUnitInDollars;
42 this.minGasPriceTarget= minGasPriceTarget;
43 this.uncleListLimit = uncleListLimit;
44 this.uncleGenerationLimit = uncleGenerationLimit;
45 this.gasLimit = gasLimit;
46 this.isFixedClock = isFixedClock;
47 }
48
49 public RskAddress getCoinbaseAddress() {
50 return coinbaseAddress;
51 }
52
53 public double getMinFeesNotifyInDollars() {
54 return minFeesNotifyInDollars;
55 }
56
57 public double getGasUnitInDollars() {
58 return minerGasUnitInDollars;
59 }
60
61 public long getMinGasPriceTarget() {
62 return minGasPriceTarget;
63 }
64
65 public int getUncleListLimit() {
66 return uncleListLimit;
67 }
68
69 public int getUncleGenerationLimit() {
70 return uncleGenerationLimit;
71 }
72
73 public GasLimitConfig getGasLimit() {
74 return gasLimit;
75 }
76
77 public boolean isFixedClock() {
78 return isFixedClock;
79 }
80 }