Skip to content

Commit

Permalink
Update DashElectrumX follow notification process of ElectrumX. (kyuup…
Browse files Browse the repository at this point in the history
  • Loading branch information
thelazier authored and Neil committed Jan 11, 2018
1 parent 81a08d1 commit a6e466e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,19 +486,20 @@ def set_protocol_handlers(self, ptuple):
'masternode.subscribe': self.masternode_subscribe,
})

async def notify(self, height, touched):
def notify(self, height, touched):
'''Notify the client about changes in masternode list.'''
await super().notify(height, touched)
result = super().notify(height, touched)

for masternode in self.mns:
status = await self.daemon.masternode_list(['status', masternode])
status = self.daemon.masternode_list(['status', masternode])
payload = {
'id': None,
'method': 'masternode.subscribe',
'params': [masternode],
'result': status.get(masternode),
}
self.send_binary(self.encode_payload(payload))
return result

def server_version(self, client_name=None, protocol_version=None):
'''Returns the server version as a string.
Expand Down

0 comments on commit a6e466e

Please sign in to comment.