From 0e2d1423e8863279d187429ee4fb80b371816d42 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Wed, 4 Nov 2020 12:17:59 +0100 Subject: allowed configuration of max-range and max-chain --- instance.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'instance.go') 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, -- cgit v1.2.3