From d049f87cdc04500760cdc19b2b48ae17daef8703 Mon Sep 17 00:00:00 2001 From: ycc Date: Tue, 28 May 2024 17:25:10 +0200 Subject: [PATCH] peers db alpha release --- client/identity.go | 1 + client/peerstorage.go | 1 + 2 files changed, 2 insertions(+) diff --git a/client/identity.go b/client/identity.go index 6c288f2..fc59027 100644 --- a/client/identity.go +++ b/client/identity.go @@ -190,6 +190,7 @@ func LoadIdentity(filename string, password string) (*Identity, error) { if err != nil { return nil, err } + id.Peers.LoadPeers(password) GetConfig().me = &id return &id, err } diff --git a/client/peerstorage.go b/client/peerstorage.go index a07ccec..9548b6d 100644 --- a/client/peerstorage.go +++ b/client/peerstorage.go @@ -25,6 +25,7 @@ type PeerStorage struct { func (ps *PeerStorage) open() error { if ps.DbFile == "" { ps.DbFile = uuid.New().String() + GetConfig().GetIdentity().Save() } if ps.cache == nil { ps.cache = make(map[string]*Peer)