https://github.com/darkwallet/darkmarket/blob/master/node/tornadoloop.py