Skip to content

Commit

Permalink
Chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Pastor committed Oct 19, 2024
1 parent d7c7932 commit 2d901d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vol3/src/main/java/ru/mifi/practice/val3/hasq/Chain.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ static Chain newChain(Token token, String passphrase) {
return new Default(token, passphrase);
}

static Chain newChain(Record root) {
static Chain loadChain(Record root) {
return new Default(root);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ static Chain read(Path path, Hash hash) throws IOException {
prev.setNext(current);
}
}
return Chain.newChain(root);
return Chain.loadChain(root);
}
}
3 changes: 1 addition & 2 deletions vol3/src/main/java/ru/mifi/practice/val3/hasq/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
import static ru.mifi.practice.val3.hasq.Chain.Detailed;
import static ru.mifi.practice.val3.hasq.Chain.Token;
import static ru.mifi.practice.val3.hasq.Chain.ValidateType;
import static ru.mifi.practice.val3.hasq.Chain.newChain;

public abstract class Main {
public static void main(String[] args) throws IOException {
String tokenValue = "1000000000";
Path filePath = Path.of(tokenValue + ".csv");
Hash hash = Hash.DEFAULT;
Chain chain = newChain(new Token(tokenValue, hash), "init")
Chain chain = Chain.newChain(new Token(tokenValue, hash), "init")
.add("init", "N1")
.add("init", "N2")
.add("init", "N3")
Expand Down

0 comments on commit 2d901d6

Please sign in to comment.