X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=blobdiff_plain;f=backends%2Fbitcoind%2Fblockchain_processor.py;h=5e7901ae705c022fb9ecaa2b810ab54ba4cd35ce;hp=e6dcd57914e569d9cb1df62ae6a13339878addb1;hb=c7b49738a0a7eb7bd67e7e08c2fb265556ce5d20;hpb=9526ce60749182cea0be7da5838fa04e3d59e0f1 diff --git a/backends/bitcoind/blockchain_processor.py b/backends/bitcoind/blockchain_processor.py index e6dcd57..5e7901a 100644 --- a/backends/bitcoind/blockchain_processor.py +++ b/backends/bitcoind/blockchain_processor.py @@ -16,6 +16,7 @@ class BlockchainProcessor(Processor): Processor.__init__(self) self.shared = shared + self.config = config self.up_to_date = False self.watched_addresses = [] self.history_cache = {} @@ -539,10 +540,15 @@ class BlockchainProcessor(Processor): elif method == 'blockchain.address.unsubscribe': try: - address = params[0] - self.watched_addresses.remove(address) - print_log('unsubscribed', address) - result = "ok" + password = params[0] + address = params[1] + if password == self.config.get('server','password'): + self.watched_addresses.remove(address) + print_log('unsubscribed', address) + result = "ok" + else: + print_log('incorrect password') + result = "authentication error" except BaseException, e: error = str(e) + ': ' + address print_log( "error:", error )