From 73b4281ad0239629d99cb8705aea1172d0692787 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 21 Jan 2013 14:33:41 +0400 Subject: [PATCH] fix: get_history was sorting with the wrong key. --- backends/bitcoind/blockchain_processor.py | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) 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 -- 1.7.1