Update DashElectrumX follow notification process of ElectrumX. (#346)
This commit is contained in:
parent
81a08d13ac
commit
a6e466e37e
@ -486,12 +486,12 @@ class DashElectrumX(ElectrumX):
|
|||||||
'masternode.subscribe': self.masternode_subscribe,
|
'masternode.subscribe': self.masternode_subscribe,
|
||||||
})
|
})
|
||||||
|
|
||||||
async def notify(self, height, touched):
|
def notify(self, height, touched):
|
||||||
'''Notify the client about changes in masternode list.'''
|
'''Notify the client about changes in masternode list.'''
|
||||||
await super().notify(height, touched)
|
result = super().notify(height, touched)
|
||||||
|
|
||||||
for masternode in self.mns:
|
for masternode in self.mns:
|
||||||
status = await self.daemon.masternode_list(['status', masternode])
|
status = self.daemon.masternode_list(['status', masternode])
|
||||||
payload = {
|
payload = {
|
||||||
'id': None,
|
'id': None,
|
||||||
'method': 'masternode.subscribe',
|
'method': 'masternode.subscribe',
|
||||||
@ -499,6 +499,7 @@ class DashElectrumX(ElectrumX):
|
|||||||
'result': status.get(masternode),
|
'result': status.get(masternode),
|
||||||
}
|
}
|
||||||
self.send_binary(self.encode_payload(payload))
|
self.send_binary(self.encode_payload(payload))
|
||||||
|
return result
|
||||||
|
|
||||||
def server_version(self, client_name=None, protocol_version=None):
|
def server_version(self, client_name=None, protocol_version=None):
|
||||||
'''Returns the server version as a string.
|
'''Returns the server version as a string.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user