From: ThomasV Date: Sat, 1 Mar 2014 20:12:09 +0000 (+0100) Subject: fix: use address and not key in db_addr X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=2a8c19f5f3bdae38e9ef89bf7515dc10a7bb1893 fix: use address and not key in db_addr --- 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)