Remove blockchain.address.* methods from protocol 1.3+

This commit is contained in:
Neil Booth 2018-07-12 11:00:57 +08:00 committed by Vivek Teega
parent f3e9b99efb
commit 36fb22cff2
2 changed files with 21 additions and 5 deletions

View File

@ -86,6 +86,15 @@ Deprecated methods
Version 1.3
===========
Removed methods
---------------
* :func:`blockchain.address.get_balance`
* :func:`blockchain.address.get_history`
* :func:`blockchain.address.get_mempool`
* :func:`blockchain.address.listunspent`
* :func:`blockchain.address.subscribe`
New methods
-----------

View File

@ -430,11 +430,6 @@ class ElectrumX(SessionBase):
controller = self.controller
handlers = {
'blockchain.address.get_balance': controller.address_get_balance,
'blockchain.address.get_history': controller.address_get_history,
'blockchain.address.get_mempool': controller.address_get_mempool,
'blockchain.address.listunspent': controller.address_listunspent,
'blockchain.address.subscribe': self.address_subscribe,
'blockchain.block.get_chunk': self.block_get_chunk,
'blockchain.block.get_header': controller.block_get_header,
'blockchain.estimatefee': controller.estimatefee,
@ -474,6 +469,18 @@ class ElectrumX(SessionBase):
handlers.update({
'blockchain.block.header': self.block_header,
})
else:
handlers.update({
'blockchain.address.get_balance':
controller.address_get_balance,
'blockchain.address.get_history':
controller.address_get_history,
'blockchain.address.get_mempool':
controller.address_get_mempool,
'blockchain.address.listunspent':
controller.address_listunspent,
'blockchain.address.subscribe': self.address_subscribe,
})
self.electrumx_handlers = handlers