Skip to content

Commit

Permalink
rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
petar committed Aug 18, 2020
1 parent 188e286 commit b7ab8e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions core/commands/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"

cmds "github.com/ipfs/go-ipfs-cmds"
keybase "github.com/ipfs/go-ipfs/core/commands/keybase"
ke "github.com/ipfs/go-ipfs/core/commands/keyencode"
ic "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/host"
peer "github.com/libp2p/go-libp2p-core/peer"
Expand Down Expand Up @@ -73,7 +73,7 @@ EXAMPLE:
cmds.StringOption(idFormatOptionName, "", "Encoding used for peer IDs: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}.").WithDefault("b58mh"),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
keyEnc, err := keybase.KeyEncoderFromString(req.Options[idFormatOptionName].(string))
keyEnc, err := ke.KeyEncoderFromString(req.Options[idFormatOptionName].(string))
if err != nil {
return err
}
Expand Down Expand Up @@ -151,7 +151,7 @@ EXAMPLE:
Type: IdOutput{},
}

func printPeer(keyEnc keybase.KeyEncoder, ps pstore.Peerstore, p peer.ID) (interface{}, error) {
func printPeer(keyEnc ke.KeyEncoder, ps pstore.Peerstore, p peer.ID) (interface{}, error) {
if p == "" {
return nil, errors.New("attempted to print nil peer")
}
Expand Down Expand Up @@ -199,7 +199,7 @@ func printPeer(keyEnc keybase.KeyEncoder, ps pstore.Peerstore, p peer.ID) (inter
}

// printing self is special cased as we get values differently.
func printSelf(keyEnc keybase.KeyEncoder, node *core.IpfsNode) (interface{}, error) {
func printSelf(keyEnc ke.KeyEncoder, node *core.IpfsNode) (interface{}, error) {
info := new(IdOutput)
info.ID = keyEnc.FormatID(node.Identity)

Expand Down
8 changes: 4 additions & 4 deletions test/sharness/t0165-keystore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ ipfs key rm key_ed25519


test_expect_success "create a new rsa key" '
rsahash=$(ipfs key gen generated_rsa_key --type=rsa --size=2048 --ipns-base=b58mh)
rsahash=$(ipfs key gen generated_rsa_key --type=rsa --size=2048 --ipns-base=base36)
echo $rsahash > rsa_key_id
'

test_expect_success "create a new ed25519 key" '
edhash=$(ipfs key gen generated_ed25519_key --type=ed25519 --ipns-base=b58mh)
edhash=$(ipfs key gen generated_ed25519_key --type=ed25519 --ipns-base=base36)
echo $edhash > ed25519_key_id
'

Expand Down Expand Up @@ -119,8 +119,8 @@ ipfs key rm key_ed25519
'

test_expect_success "key hashes show up in long list output" '
ipfs key list -l --ipns-base=b58mh | grep $edhash > /dev/null &&
ipfs key list -l --ipns-base=b58mh | grep $rsahash > /dev/null
ipfs key list -l --ipns-base=base36 | grep $edhash > /dev/null &&
ipfs key list -l --ipns-base=base36 | grep $rsahash > /dev/null
'

test_expect_success "key list -l contains self key with peerID" '
Expand Down

0 comments on commit b7ab8e1

Please sign in to comment.