Coverage Summary for Class: ConsensusRule (org.ethereum.config.blockchain.upgrades)
Class |
Class, %
|
Method, %
|
Line, %
|
ConsensusRule |
100%
(1/1)
|
100%
(5/5)
|
98.3%
(59/60)
|
1 /*
2 * This file is part of RskJ
3 * Copyright (C) 2019 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 org.ethereum.config.blockchain.upgrades;
20
21 public enum ConsensusRule {
22 ARE_BRIDGE_TXS_PAID("areBridgeTxsPaid"),
23 RSKIP85("rskip85"),
24 RSKIP87("rskip87"),
25 RSKIP88("rskip88"),
26 RSKIP89("rskip89"),
27 RSKIP90("rskip90"),
28 RSKIP91("rskip91"),
29 RSKIP92("rskip92"),
30 RSKIP97("rskip97"),
31 RSKIP98("rskip98"),
32 RSKIP103("rskip103"),
33 RSKIP106("rskip106"),
34 RSKIP110("rskip110"),
35 RSKIP119("rskip119"),
36 RSKIP120("rskip120"),
37 RSKIP122("rskip122"),
38 RSKIP123("rskip123"),
39 RSKIP124("rskip124"),
40 RSKIP125("rskip125"),
41 RSKIP126("rskip126"),
42 RSKIP132("rskip132"),
43 RSKIP134("rskip134"),
44 RSKIP136("rskip136"),
45 RSKIP137("rskip137"),
46 RSKIP140("rskip140"),
47 RSKIP143("rskip143"),
48 RSKIP146("rskip146"),
49 RSKIP150("rskip150"),
50 RSKIP151("rskip151"),
51 RSKIP152("rskip152"),
52 RSKIP153("rskip153"), // BLAKE2 Compression Function Precompiled
53 RSKIP156("rskip156"),
54 RSKIP169("rskip169"),
55 RSKIP170("rskip170"),
56 RSKIP171("rskip171"),
57 RSKIP174("rskip174"),
58 RSKIP176("rskip176"),
59 RSKIP179("rskip179"), // BTC-RSK timestamp linking
60 RSKIP180("rskip180"), // Limit RSK merged mining merkle proof
61 RSKIP181("rskip181"), // Peg-in rejection events
62 RSKIP186("rskip186"), // Active Federation creation block height registration
63 RSKIPUMM("rskipUMM"),
64 RSKIP185("rskip185"), // Peg-out refund and events
65 RSKIP191("rskip191"),
66 RSKIP197("rskip197"), // Handle error in Precompile Contracts execution.
67 RSKIP199("rskip199"),
68 RSKIP200("rskip200"),
69 RSKIP201("rskip201"),
70 RSKIP218("rskip218"), // New rewards fee adddress
71 RSKIP219("rskip219"),
72 RSKIP220("rskip220");
73
74 private String configKey;
75
76 ConsensusRule(String configKey) {
77 this.configKey = configKey;
78 }
79
80 public String getConfigKey() {
81 return configKey;
82 }
83
84 public static ConsensusRule fromConfigKey(String configKey) {
85 for (ConsensusRule consensusRule : ConsensusRule.values()) {
86 if (consensusRule.configKey.equals(configKey)) {
87 return consensusRule;
88 }
89 }
90
91 throw new IllegalArgumentException(String.format("Unknown consensus rule %s", configKey));
92 }
93 }