aboutsummaryrefslogtreecommitdiff
path: root/instance.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-04 12:17:59 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-04 12:17:59 +0100
commit0e2d1423e8863279d187429ee4fb80b371816d42 (patch)
tree485e4cd22c88ddb3d15fb3954c702e8a3b42c8cc /instance.go
parente7d80645f5f3795183ff6062a6529ea226d8ef47 (diff)
allowed configuration of max-range and max-chain
Diffstat (limited to 'instance.go')
-rw-r--r--instance.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/instance.go b/instance.go
index 178b058..d5c47c9 100644
--- a/instance.go
+++ b/instance.go
@@ -54,7 +54,7 @@ func NewInstance(lp *LogParameters, client trillian.TrillianLogClient, deadline
}
// NewLogParameters initializes log parameters, assuming ed25519 signatures.
-func NewLogParameters(treeId int64, prefix string, anchorPath, keyPath string) (*LogParameters, error) {
+func NewLogParameters(treeId int64, prefix string, anchorPath, keyPath string, maxRange, maxChain int64) (*LogParameters, error) {
anchorList, anchorPool, err := LoadTrustAnchors(anchorPath)
if err != nil {
return nil, err
@@ -77,8 +77,8 @@ func NewLogParameters(treeId int64, prefix string, anchorPath, keyPath string) (
LogId: logId,
TreeId: treeId,
Prefix: prefix,
- MaxRange: 2, // TODO: allow configuration
- MaxChain: 3, // TODO: allow configuration
+ MaxRange: maxRange,
+ MaxChain: maxChain,
AnchorPool: anchorPool,
AnchorList: anchorList,
Signer: key,