This commit is contained in:
parent
e674a0cb33
commit
d049f87cdc
@ -190,6 +190,7 @@ func LoadIdentity(filename string, password string) (*Identity, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
id.Peers.LoadPeers(password)
|
||||||
GetConfig().me = &id
|
GetConfig().me = &id
|
||||||
return &id, err
|
return &id, err
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ type PeerStorage struct {
|
|||||||
func (ps *PeerStorage) open() error {
|
func (ps *PeerStorage) open() error {
|
||||||
if ps.DbFile == "" {
|
if ps.DbFile == "" {
|
||||||
ps.DbFile = uuid.New().String()
|
ps.DbFile = uuid.New().String()
|
||||||
|
GetConfig().GetIdentity().Save()
|
||||||
}
|
}
|
||||||
if ps.cache == nil {
|
if ps.cache == nil {
|
||||||
ps.cache = make(map[string]*Peer)
|
ps.cache = make(map[string]*Peer)
|
||||||
|
Loading…
Reference in New Issue
Block a user