mirror of
https://github.com/vacp2p/status-linea-besu.git
synced 2026-01-08 21:38:15 -05:00
Merge branch 'main' into zkbesu
# Conflicts: # build.gradle
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
*/
|
||||
package org.hyperledger.besu.datatypes;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/** Description and metadata for a hard fork */
|
||||
public interface HardforkId {
|
||||
|
||||
@@ -112,6 +115,19 @@ public interface HardforkId {
|
||||
public String description() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* The most recent finalized mainnet hardfork Besu supports. This will change across versions
|
||||
* and will be updated after mainnet activations.
|
||||
*
|
||||
* @return the most recently activated mainnet spec.
|
||||
*/
|
||||
public static MainnetHardforkId mostRecent() {
|
||||
return Stream.of(MainnetHardforkId.values())
|
||||
.filter(MainnetHardforkId::finalized)
|
||||
.max(Comparator.naturalOrder())
|
||||
.orElseThrow();
|
||||
}
|
||||
}
|
||||
|
||||
/** List of all Ethereum Classic hard forks. */
|
||||
|
||||
Reference in New Issue
Block a user