From f8c0ebf3ad75e23cf0355b8dda05743e3f812411 Mon Sep 17 00:00:00 2001
From: capossele <angelocapossele@gmail.com>
Date: Tue, 6 Aug 2019 18:30:32 +0100
Subject: [PATCH] :bug: fix ExpirationTime Unmarshal

---
 plugins/autopeering/types/salt/salt.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/autopeering/types/salt/salt.go b/plugins/autopeering/types/salt/salt.go
index 64b5efcb..c52a14b7 100644
--- a/plugins/autopeering/types/salt/salt.go
+++ b/plugins/autopeering/types/salt/salt.go
@@ -68,10 +68,11 @@ func Unmarshal(marshaledSalt []byte) (*Salt, error) {
 	}
 	salt.SetBytes(marshaledSalt[SALT_BYTES_START:SALT_BYTES_END])
 
-	expTime := salt.GetExpirationTime()
+	var expTime time.Time
 	if err := expTime.UnmarshalBinary(marshaledSalt[SALT_TIME_START:SALT_TIME_END]); err != nil {
 		return nil, err
 	}
+	salt.SetExpirationTime(expTime)
 
 	return salt, nil
 }
-- 
GitLab