[Ready for review/merge] Search time

search.js:
- Updated debugging output for readability
- Search results were trying to key compare on unset values

search.html
- UI now shows tags for search results and links to searches for those tags

connection.py
- Removing hostname to IP code due to unexpected connectivity issues and minimal benefit
- Fixed null callback passed to lambda
- Upped timeout to 5 seconds for slow peers

dht.py
- Add Known Node takes a URI not an ip and port separately so fixed that
- Removed some unnecessary debugging output to clarify logs
- Add Known Node if not in the knownNodes. Was not getting added properly
- Removed Timeout of peers unknowing. This seems to be causing a threading issue where someone might try to reach that peer as you’re unknowing it. There probably needs to be a better way to do this.
- Kademlia requires you to send back close nodes even if you have routing to the exact node and we were shorting that by just returning the exact node. This creates an issue stopping us from having redundancy of storage.
- Mostly debugging cleanup beyond this

market.py
- Debugging info added
- Threading now for DHT storage of contracts, updates to listing indices and keyword indices

transport.py
- Fixed the ip/port and URI issue mentioned above

ws.py
- Added a client refund order method for setting up refunds (somewhat unrelated to the rest of the PR but give me a break)



Theoretical CS \m/

On Sat, Sep 20, 2014 at 7:24 PM, Nick Korasidis <notifications@github.com>
wrote:

> In node/connection.py:
>
> > @@ -160,7 +157,7 @@ def cb(msg):
> >                      'senderGUID': self.transport.guid,
> >                      'senderNick': self.transport.nickname
> >                  }),
> > -                cb
> > +                lambda msg, handshake_cb=handshake_cb: cb(msg, handshake_cb)
>
> Since cb is a function accepting the same arguments as the anonymous
> lambda, I think the lambda is redundant lambda; the original code works
> fine. You can almost always replace
>
> lambda a, b: foo(a, b)
>
> with
>
> foo
>
> (Funny fact: This pattern of simplification is so common in certain
> contexts, it has a name: eta-reduction
> <https://en.wikipedia.org/wiki/Lambda_calculus#.CE.B7-conversion>)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/OpenBazaar/OpenBazaar/pull/608/files#r17820336>.
>