mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
turn logging on by default, also make Provide not fail when no peers connected
This commit is contained in:
parent
adcf0bfe70
commit
7bc4fbfa5d
@ -62,7 +62,7 @@ func ipfsCmd(c *commander.Command, args []string) error {
|
||||
}
|
||||
|
||||
func main() {
|
||||
// u.Debug = true
|
||||
u.Debug = true
|
||||
err := CmdIpfs.Dispatch(os.Args[1:])
|
||||
if err != nil {
|
||||
if len(err.Error()) > 0 {
|
||||
|
||||
@ -30,7 +30,6 @@ var cmdIpfsMount = &commander.Command{
|
||||
}
|
||||
|
||||
func mountCmd(c *commander.Command, inp []string) error {
|
||||
u.Debug = false
|
||||
if len(inp) < 1 || len(inp[0]) == 0 {
|
||||
u.POut(c.Long)
|
||||
return nil
|
||||
|
||||
@ -194,7 +194,7 @@ func (dht *IpfsDHT) FindProviders(ctx context.Context, key u.Key) ([]*peer.Peer,
|
||||
u.DOut("Find providers for: '%s'\n", key)
|
||||
p := dht.routingTables[0].NearestPeer(kb.ConvertKey(key))
|
||||
if p == nil {
|
||||
return nil, kb.ErrLookupFailure
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
for level := 0; level < len(dht.routingTables); {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user