aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-22 20:10:03 +0200
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-10-22 20:10:03 +0200
commite049d303d911b02d7505214e56744f21437f3916 (patch)
tree260bea3c65ab96209dcd7eb68f133dd8199ccc29
parent44e4fb0f4e9e9ff9bf6e31c68b626fea2eb7403a (diff)
indented using go fmt
-rw-r--r--handler.go6
-rw-r--r--type.go16
2 files changed, 11 insertions, 11 deletions
diff --git a/handler.go b/handler.go
index 57adaf1..10defba 100644
--- a/handler.go
+++ b/handler.go
@@ -175,9 +175,9 @@ func getProofByHash(ctx context.Context, i *instance, w http.ResponseWriter, r *
}
trillianRequest := trillian.GetInclusionProofByHashRequest{
- LogId: i.logID,
- LeafHash: request.Hash,
- TreeSize: request.TreeSize,
+ LogId: i.logID,
+ LeafHash: request.Hash,
+ TreeSize: request.TreeSize,
OrderBySequence: true,
}
trillianResponse, err := i.client.GetInclusionProofByHash(ctx, &trillianRequest)
diff --git a/type.go b/type.go
index 10ec2bd..bd54df6 100644
--- a/type.go
+++ b/type.go
@@ -100,22 +100,22 @@ type NodeHash struct {
}
type InclusionProofV1 struct {
- LogID []byte `tls:"minlen:2,maxlen:127"`
- TreeSize uint64
- LeafIndex uint64
+ LogID []byte `tls:"minlen:2,maxlen:127"`
+ TreeSize uint64
+ LeafIndex uint64
InclusionPath []NodeHash `tls:"minlen:1,maxlen:65535"`
}
func NewInclusionProofV1(logID []byte, treeSize uint64, proof *trillian.Proof) InclusionProofV1 {
inclusionPath := make([]NodeHash, 0, len(proof.Hashes))
for _, hash := range proof.Hashes {
- inclusionPath = append(inclusionPath, NodeHash{ Data: hash })
+ inclusionPath = append(inclusionPath, NodeHash{Data: hash})
}
return InclusionProofV1{
- LogID: logID,
- TreeSize: treeSize,
- LeafIndex: uint64(proof.LeafIndex),
+ LogID: logID,
+ TreeSize: treeSize,
+ LeafIndex: uint64(proof.LeafIndex),
InclusionPath: inclusionPath,
}
}
@@ -182,7 +182,7 @@ func NewGetEntriesResponse(leaves []*trillian.LogLeaf) (GetEntriesResponse, erro
}
type GetProofByHashRequest struct {
- Hash []byte
+ Hash []byte
TreeSize int64
}