obelisk

Electrum server using libbitcoin as its backend
git clone https://git.parazyd.org/obelisk
Log | Files | Refs | README | LICENSE

commit f1a7d430089c56ba5f6446a2eae245ce50c86967
parent 2b45995159b020b9a58bd618fffd54cd2ac1ec25
Author: parazyd <parazyd@dyne.org>
Date:   Wed,  7 Apr 2021 18:56:45 +0200

Rename ZeroMQ block_header to fetch_block_header

Diffstat:
Melectrumobelisk/protocol.py | 4++--
Melectrumobelisk/zeromq.py | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/electrumobelisk/protocol.py b/electrumobelisk/protocol.py @@ -163,7 +163,7 @@ class ElectrumProtocol(asyncio.Protocol): # pylint: disable=R0904,R0902 if not is_non_negative_integer(cp_height): return {"error": "invalid cp_height"} - _ec, data = await self.bx.block_header(index) + _ec, data = await self.bx.fetch_block_header(index) if _ec and _ec != 0: self.log.debug("Got error: {_ec}") return {"error": "request corrupted"} @@ -187,7 +187,7 @@ class ElectrumProtocol(asyncio.Protocol): # pylint: disable=R0904,R0902 count = min(count, max_chunk_size) headers = bytearray() for i in range(count): - _ec, data = await self.bx.block_header(i) + _ec, data = await self.bx.fetch_block_header(i) if _ec and _ec != 0: self.log.debug("Got error: {_ec}") return {"error": "request corrupted"} diff --git a/electrumobelisk/zeromq.py b/electrumobelisk/zeromq.py @@ -249,7 +249,7 @@ class Client: assert response.request_id == request.id_ return response.error_code, response.data - async def block_header(self, index): + async def fetch_block_header(self, index): """Fetch a block header by its height or integer index""" command = b"blockchain.fetch_block_header" data = pack_block_index(index)