From 2a8c19f5f3bdae38e9ef89bf7515dc10a7bb1893 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 1 Mar 2014 21:12:09 +0100 Subject: [PATCH] fix: use address and not key in db_addr --- backends/bitcoind/storage.py | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backends/bitcoind/storage.py b/backends/bitcoind/storage.py index cca9645..6dcf027 100644 --- a/backends/bitcoind/storage.py +++ b/backends/bitcoind/storage.py @@ -144,8 +144,7 @@ class Storage(object): def get_address(self, txi): - addr = self.db_addr.get(txi) - return self.key_to_address(addr) if addr else None + return self.db_addr.get(txi) def get_undo_info(self, height): @@ -492,7 +491,7 @@ class Storage(object): self.add_address(key + txo, value, tx_height) # backlink - self.db_addr.put(txo, key) + self.db_addr.put(txo, addr) @@ -542,7 +541,7 @@ class Storage(object): leaf = key + txi # restore backlink - self.db_addr.put(txi, key) + self.db_addr.put(txi, addr) v, height = undo.pop(leaf) self.add_address(leaf, v, height) -- 1.7.1