is_known = False
# should not be necessary
- hist.sort(key=lambda tup: tup[1])
+ hist.sort(key=lambda tup: tup[2])
# check uniqueness too...
# add memory pool
tx_height = params[1]
result = self.get_merkle(tx_hash, tx_height)
except BaseException, e:
- error = str(e) + ': ' + tx_hash
- print_log("error:", error)
+ error = str(e) + ': ' + repr(params)
+ print_log("get_merkle error:", error)
elif method == 'blockchain.transaction.get':
try:
height = params[1]
result = self.bitcoind('getrawtransaction', [tx_hash, 0, height])
except BaseException, e:
- error = str(e) + ': ' + tx_hash
- print_log("error:", error)
+ error = str(e) + ': ' + repr(params)
+ print_log("tx get error:", error)
else:
error = "unknown method:%s" % method
def invalidate_cache(self, address):
with self.cache_lock:
- if 'address' in self.history_cache:
+ if address in self.history_cache:
print_log("cache: invalidating", address)
self.history_cache.pop(address)