java.lang.Object
io.mokamint.node.BasicConsensusConfigBuilders
Providers of basic consensus configurations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classGson decoder.static classGson encoder.static classJson representation. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConsensusConfigBuilder<?, ?> defaults()Creates a configuration builder containing default data.static ConsensusConfigBuilder<?, ?> Creates a configuration builder from the given TOML configuration file.
-
Method Details
-
defaults
Creates a configuration builder containing default data.- Returns:
- the builder
- Throws:
NoSuchAlgorithmException- if some hashing algorithm used in the default configuration is not available
-
load
public static ConsensusConfigBuilder<?,?> load(Path path) throws NoSuchAlgorithmException, FileNotFoundException Creates a configuration builder from the given TOML configuration file. The resulting builder will contain the information in the file, and use defaults for the data not contained in the file.- Parameters:
path- the path to the TOML file- Returns:
- the builder
- Throws:
FileNotFoundException- ifpathcannot be foundNoSuchAlgorithmException- if the configuration file refers to some non-available hashing algorithm
-