From 41b676ee0bfda8e5cd0ae2500547a91f95224f17 Mon Sep 17 00:00:00 2001 From: Masanori Yoshida Date: Thu, 11 Apr 2024 16:49:15 +0900 Subject: [PATCH] WIP: change the timing when pr.homePath (and pr.codec) is initialized Signed-off-by: Masanori Yoshida --- relay/prover.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relay/prover.go b/relay/prover.go index 01f1e3c..3133382 100644 --- a/relay/prover.go +++ b/relay/prover.go @@ -62,6 +62,8 @@ func (pr *Prover) GetOriginProver() core.Prover { // Init initializes the chain func (pr *Prover) Init(homePath string, timeout time.Duration, codec codec.ProtoCodecMarshaler, debug bool) error { + pr.homePath = homePath + pr.codec = codec if debug { ias.SetAllowDebugEnclaves() } @@ -74,8 +76,6 @@ func (pr *Prover) Init(homePath string, timeout time.Duration, codec codec.Proto if err := os.MkdirAll(pr.dbPath(), os.ModePerm); err != nil { return err } - pr.homePath = homePath - pr.codec = codec return nil }