Browse Source

Remove blockchain.address.* methods from protocol 1.3+

patch-2
Neil Booth 7 years ago
parent
commit
7911f0d525
  1. 9
      docs/protocol-changes.rst
  2. 17
      electrumx/server/session.py

9
docs/protocol-changes.rst

@ -86,6 +86,15 @@ Deprecated methods
Version 1.3 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 New methods
----------- -----------

17
electrumx/server/session.py

@ -430,11 +430,6 @@ class ElectrumX(SessionBase):
controller = self.controller controller = self.controller
handlers = { 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_chunk': self.block_get_chunk,
'blockchain.block.get_header': controller.block_get_header, 'blockchain.block.get_header': controller.block_get_header,
'blockchain.estimatefee': controller.estimatefee, 'blockchain.estimatefee': controller.estimatefee,
@ -474,6 +469,18 @@ class ElectrumX(SessionBase):
handlers.update({ handlers.update({
'blockchain.block.header': self.block_header, '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 self.electrumx_handlers = handlers

Loading…
Cancel
Save