Wallets record default address in keystore

This commit is contained in:
whyrusleeping
2019-10-17 19:18:40 +09:00
parent 75db4576f5
commit d818e20df5
12 changed files with 123 additions and 26 deletions
+4 -4
View File
@@ -2,11 +2,11 @@ package lp2p
import (
"crypto/rand"
"github.com/filecoin-project/go-lotus/chain/types"
"github.com/filecoin-project/go-lotus/node/repo"
"golang.org/x/xerrors"
"time"
"github.com/filecoin-project/go-lotus/chain/types"
"golang.org/x/xerrors"
logging "github.com/ipfs/go-log"
"github.com/libp2p/go-libp2p"
connmgr "github.com/libp2p/go-libp2p-connmgr"
@@ -31,7 +31,7 @@ func PrivKey(ks types.KeyStore) (crypto.PrivKey, error) {
if err == nil {
return crypto.UnmarshalPrivateKey(k.PrivateKey)
}
if !xerrors.Is(err, repo.ErrKeyNotFound) {
if !xerrors.Is(err, types.ErrKeyInfoNotFound) {
return nil, err
}
pk, err := genLibp2pKey()