style: libp2p new

Co-authored-by: Łukasz Magiera <magik6k@users.noreply.github.com>
This commit is contained in:
swift-mx 2022-06-02 16:36:18 +08:00 committed by GitHub
parent e691efb9cd
commit 0fd74eda69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,11 +59,7 @@ var helloCmd = &cli.Command{
if err != nil {
return err
}
priv, _, err := crypto.GenerateKeyPair(crypto.RSA, 2048)
if err != nil {
return err
}
h, err := libp2p.New(libp2p.Identity(priv))
h, err := libp2p.New()
if err != nil {
return err
}