re-add blockchain.scripthash.get_balance
fixes https://github.com/lbryio/scribe/issues/19
This commit is contained in:
parent
311db529a0
commit
aa75eebc22
1 changed files with 6 additions and 4 deletions
|
@ -827,6 +827,8 @@ class LBRYElectrumX(asyncio.Protocol):
|
||||||
coro = self.scripthash_get_mempool
|
coro = self.scripthash_get_mempool
|
||||||
elif method == 'blockchain.scripthash.subscribe':
|
elif method == 'blockchain.scripthash.subscribe':
|
||||||
coro = self.scripthash_subscribe
|
coro = self.scripthash_subscribe
|
||||||
|
elif method == 'blockchain.scripthash.get_balance':
|
||||||
|
coro = self.scripthash_get_balance
|
||||||
elif method == 'blockchain.transaction.broadcast':
|
elif method == 'blockchain.transaction.broadcast':
|
||||||
coro = self.transaction_broadcast
|
coro = self.transaction_broadcast
|
||||||
elif method == 'blockchain.transaction.get':
|
elif method == 'blockchain.transaction.get':
|
||||||
|
@ -1409,10 +1411,10 @@ class LBRYElectrumX(asyncio.Protocol):
|
||||||
unconfirmed = self.mempool.balance_delta(hashX)
|
unconfirmed = self.mempool.balance_delta(hashX)
|
||||||
return {'confirmed': confirmed, 'unconfirmed': unconfirmed}
|
return {'confirmed': confirmed, 'unconfirmed': unconfirmed}
|
||||||
|
|
||||||
# async def scripthash_get_balance(self, scripthash):
|
async def scripthash_get_balance(self, scripthash):
|
||||||
# """Return the confirmed and unconfirmed balance of a scripthash."""
|
"""Return the confirmed and unconfirmed balance of a scripthash."""
|
||||||
# hashX = scripthash_to_hashX(scripthash)
|
hashX = scripthash_to_hashX(scripthash)
|
||||||
# return await self.get_balance(hashX)
|
return await self.get_balance(hashX)
|
||||||
|
|
||||||
def unconfirmed_history(self, hashX):
|
def unconfirmed_history(self, hashX):
|
||||||
# Note unconfirmed history is unordered in electrum-server
|
# Note unconfirmed history is unordered in electrum-server
|
||||||
|
|
Loading…
Reference in a new issue