Commit 7bc4fbfa authored by Jeromy's avatar Jeromy

turn logging on by default, also make Provide not fail when no peers connected

parent adcf0bfe
...@@ -62,7 +62,7 @@ func ipfsCmd(c *commander.Command, args []string) error { ...@@ -62,7 +62,7 @@ func ipfsCmd(c *commander.Command, args []string) error {
} }
func main() { func main() {
// u.Debug = true u.Debug = true
err := CmdIpfs.Dispatch(os.Args[1:]) err := CmdIpfs.Dispatch(os.Args[1:])
if err != nil { if err != nil {
if len(err.Error()) > 0 { if len(err.Error()) > 0 {
......
...@@ -30,7 +30,6 @@ var cmdIpfsMount = &commander.Command{ ...@@ -30,7 +30,6 @@ var cmdIpfsMount = &commander.Command{
} }
func mountCmd(c *commander.Command, inp []string) error { func mountCmd(c *commander.Command, inp []string) error {
u.Debug = false
if len(inp) < 1 || len(inp[0]) == 0 { if len(inp) < 1 || len(inp[0]) == 0 {
u.POut(c.Long) u.POut(c.Long)
return nil return nil
......
...@@ -194,7 +194,7 @@ func (dht *IpfsDHT) FindProviders(ctx context.Context, key u.Key) ([]*peer.Peer, ...@@ -194,7 +194,7 @@ func (dht *IpfsDHT) FindProviders(ctx context.Context, key u.Key) ([]*peer.Peer,
u.DOut("Find providers for: '%s'\n", key) u.DOut("Find providers for: '%s'\n", key)
p := dht.routingTables[0].NearestPeer(kb.ConvertKey(key)) p := dht.routingTables[0].NearestPeer(kb.ConvertKey(key))
if p == nil { if p == nil {
return nil, kb.ErrLookupFailure return nil, nil
} }
for level := 0; level < len(dht.routingTables); { for level := 0; level < len(dht.routingTables); {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment