-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #110 New admin endpoint to create and start node with updated g…
…enesis config
- Loading branch information
Showing
6 changed files
with
202 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...i/src/main/java/com/bloxbean/cardano/yacicli/localcluster/config/CustomGenesisConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.bloxbean.cardano.yacicli.localcluster.config; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/* | ||
* This class holds the custom overloaded values for the GenesisConfig. Ideally, the map in this class remains empty. | ||
* However, if the GenesisConfig is updated through the admin create endpoint, these values will be merged with the default GenesisConfig values during creation of node. | ||
*/ | ||
@Component | ||
public class CustomGenesisConfig { | ||
private Map<String, String> map; | ||
|
||
public CustomGenesisConfig() { | ||
this.map = new HashMap<>(); | ||
} | ||
|
||
public void populate(Map<String, String> updatedMap) { | ||
this.map.clear(); | ||
this.map.putAll(updatedMap); | ||
} | ||
|
||
public Map<String, String> getMap() { | ||
return map; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.