1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-12-15 05:48:31 +08:00

fix: remove some deprecated calls

This commit is contained in:
Steven Allen
2021-07-22 15:36:32 -07:00
parent 6e610066f6
commit 2138798ea5
3 changed files with 7 additions and 8 deletions

View File

@@ -22,7 +22,7 @@ import (
"github.com/ipfs/go-ipfs-config"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/tests"
ci "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/crypto"
peer "github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/p2p/net/mock"
)
@@ -40,7 +40,7 @@ func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int)
for i := 0; i < n; i++ {
var ident config.Identity
if fullIdentity {
sk, pk, err := ci.GenerateKeyPair(ci.RSA, 2048)
sk, pk, err := crypto.GenerateKeyPair(crypto.RSA, 2048)
if err != nil {
return nil, err
}
@@ -50,7 +50,7 @@ func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int)
return nil, err
}
kbytes, err := sk.Bytes()
kbytes, err := crypto.MarshalPrivateKey(sk)
if err != nil {
return nil, err
}