aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils_state.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils_state.go b/utils_state.go
index 2273c24..89d2fc2 100644
--- a/utils_state.go
+++ b/utils_state.go
@@ -14,11 +14,11 @@ type treeHead struct {
RootHash [sha256.Size]byte `json:root_hash"`
}
-func readState(opts options, logID []byte) (treeHead, error) {
- if _, err := os.Stat(fmt.Sprintf("%s/%x/%s", opts.logDirectory, logID, opts.stateFile)); err != nil {
+func readState(opts options, id []byte) (treeHead, error) {
+ if _, err := os.Stat(fmt.Sprintf("%s/%x/%s", opts.logDirectory, id, opts.stateFile)); err != nil {
return treeHead{0, sha256.Sum256(nil)}, nil
}
- b, err := os.ReadFile(fmt.Sprintf("%s/%x/%s", opts.logDirectory, logID, opts.stateFile))
+ b, err := os.ReadFile(fmt.Sprintf("%s/%x/%s", opts.logDirectory, id, opts.stateFile))
if err != nil {
return treeHead{}, err
}
@@ -29,8 +29,8 @@ func readState(opts options, logID []byte) (treeHead, error) {
return th, nil
}
-func readSnapshot(opts options, logID []byte) (ct.SignedTreeHead, error) {
- b, err := os.ReadFile(fmt.Sprintf("%s/%x/%s", opts.logDirectory, logID, opts.sthFile))
+func readSnapshot(opts options, id []byte) (ct.SignedTreeHead, error) {
+ b, err := os.ReadFile(fmt.Sprintf("%s/%x/%s", opts.logDirectory, id, opts.sthFile))
if err != nil {
return ct.SignedTreeHead{}, err
}