Skip to content

Commit

Permalink
docs: clarify why 'ipfs id <peer>' in offline mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jan 19, 2022
1 parent a8cdc5b commit 27432e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/commands/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
identify "github.com/libp2p/go-libp2p/p2p/protocol/identify"
)

const offlineIdErrorMessage = "'ipfs id' cannot query information on remote peers without a running daemon; use the --offline option instead."
const offlineIdErrorMessage = "'ipfs id' cannot query information on remote peers without a running daemon; if you only want to convert --peerid-base, pass --offline option."

type IdOutput struct {
ID string
Expand Down
2 changes: 1 addition & 1 deletion test/sharness/t0026-id.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ test_expect_success "checking ID of self" '
test_cmp expected-id actual-id
'

test_expect_success "checking ID of random peer offline" '
test_expect_success "checking and converting ID of a random peer while offline" '
# Peer ID taken from `t0140-swarm.sh` test.
echo k2k4r8ncs1yoluq95unsd7x2vfhgve0ncjoggwqx9vyh3vl8warrcp15 > expected-id &&
ipfs id -f "<id>\n" --peerid-base base36 --offline QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N > actual-id &&
Expand Down

0 comments on commit 27432e6

Please sign in to comment.