X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=backends%2Fabe%2F__init__.py;h=48c01de63dbc55d58858343a7ed1e53c3936fc2b;hb=86f6eb4020342fc41308c305f9305ec79e42d603;hp=fac40b492da14a9a13cf6a08dedbcf63d038e9d3;hpb=8257da318391fdd14cf79e72ecd3d90178d4c6cc;p=electrum-server.git diff --git a/backends/abe/__init__.py b/backends/abe/__init__.py index fac40b4..48c01de 100644 --- a/backends/abe/__init__.py +++ b/backends/abe/__init__.py @@ -13,6 +13,8 @@ import time, threading class AbeStore(Datastore_class): + addrtype = 48 + def __init__(self, config): conf = DataStore.CONFIG_DEFAULTS args, argv = readconf.parse_argv( [], conf) @@ -68,7 +70,7 @@ class AbeStore(Datastore_class): #print "WARNING: missing tx_in for tx", txid continue - address = hash_to_address(chr(0), _hash) + address = hash_to_address(chr(addrtype), _hash) if self.tx_cache.has_key(address): print "cache: invalidating", address self.tx_cache.pop(address) @@ -81,7 +83,7 @@ class AbeStore(Datastore_class): #print "WARNING: missing tx_out for tx", txid continue - address = hash_to_address(chr(0), _hash) + address = hash_to_address(chr(addrtype), _hash) if self.tx_cache.has_key(address): print "cache: invalidating", address self.tx_cache.pop(address) @@ -314,7 +316,7 @@ class AbeStore(Datastore_class): if not _hash: #print "WARNING: missing tx_in for tx", tx_id, addr continue - address = hash_to_address(chr(0), _hash) + address = hash_to_address(chr(addrtype), _hash) txinputs.append(address) txpoint['inputs'] = txinputs txoutputs = [] @@ -324,7 +326,7 @@ class AbeStore(Datastore_class): if not _hash: #print "WARNING: missing tx_out for tx", tx_id, addr continue - address = hash_to_address(chr(0), _hash) + address = hash_to_address(chr(addrtype), _hash) txoutputs.append(address) txpoint['outputs'] = txoutputs