Skip to content

Commit

Permalink
Fix path, fix shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardladenthin committed Mar 12, 2024
1 parent 82463c6 commit b8b239f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
8 changes: 4 additions & 4 deletions examples/config_Find_SecretsFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@
"producerJavaSecretsFiles" : [
{
"files" : [
"fileContainingSecrets_BIG_INTEGER.txt"
"secrets/fileContainingSecrets_BIG_INTEGER.txt"
],
"secretFormat" : "STRING_DO_SHA256",
"logSecretBase" : true,
"gridNumBits" : 0
},
{
"files" : [
"fileContainingSecrets_DUMPED_RIVATE_KEY.txt"
"secrets/fileContainingSecrets_DUMPED_RIVATE_KEY.txt"
],
"secretFormat" : "STRING_DO_SHA256",
"logSecretBase" : true,
"gridNumBits" : 0
},
{
"files" : [
"fileContainingSecrets_SHA256.txt"
"secrets/fileContainingSecrets_SHA256.txt"
],
"secretFormat" : "STRING_DO_SHA256",
"logSecretBase" : true,
"gridNumBits" : 0
},
{
"files" : [
"fileContainingSecrets_STRING_DO_SHA256.txt"
"secrets/fileContainingSecrets_STRING_DO_SHA256.txt"
],
"secretFormat" : "STRING_DO_SHA256",
"logSecretBase" : true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ public void initProducer() {

@Override
public void produceKeys() {
final NetworkParameters networkParameters = new NetworkParameterFactory().getOrCreate();

FileHelper fileHelper = new FileHelper();
List<File> files = fileHelper.stringsToFiles(producerJavaSecretsFiles.files);
fileHelper.assertFilesExists(files);

logger.info("writeAllAmounts ...");
logger.info("Iterate secrets files ...");
try {
final NetworkParameters networkParameters = new NetworkParameterFactory().getOrCreate();

FileHelper fileHelper = new FileHelper();
List<File> files = fileHelper.stringsToFiles(producerJavaSecretsFiles.files);
fileHelper.assertFilesExists(files);

logger.info("Iterate secrets files ...");
for (File file : files) {
SecretsFile secretsFile = new SecretsFile(
networkParameters,
Expand All @@ -76,6 +75,9 @@ public void produceKeys() {
}
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
// try and do this produce one time only
this.shouldRun.set(false);
}
}

Expand Down

0 comments on commit b8b239f

Please sign in to comment.