From: ThomasV Date: Mon, 21 Jan 2013 10:33:41 +0000 (+0400) Subject: fix: get_history was sorting with the wrong key. X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=73b4281ad0239629d99cb8705aea1172d0692787 fix: get_history was sorting with the wrong key. --- diff --git a/backends/bitcoind/blockchain_processor.py b/backends/bitcoind/blockchain_processor.py index 865d72a..67cfba8 100644 --- a/backends/bitcoind/blockchain_processor.py +++ b/backends/bitcoind/blockchain_processor.py @@ -244,7 +244,7 @@ class BlockchainProcessor(Processor): 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 @@ -608,8 +608,8 @@ class BlockchainProcessor(Processor): 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: @@ -617,8 +617,8 @@ class BlockchainProcessor(Processor): 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