Skip to content

Commit d41fc56

Browse files
author
not2day
committed
-added nextProposal to method get_daemon_status()
-set_current_snark_worker() method implemented
1 parent 51ea074 commit d41fc56

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

CodaClient.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def get_daemon_status(self) -> dict:
136136
snarkWorkFee
137137
syncStatus
138138
proposePubkeys
139+
nextProposal
139140
consensusTimeBestTip
140141
consensusTimeNow
141142
consensusMechanism
@@ -320,11 +321,17 @@ def set_current_snark_worker(self, worker_pk: str, fee: str) -> dict:
320321
dict -- Returns the "data" field of the JSON Response as a Dict
321322
"""
322323
query = '''
323-
{
324-
syncStatus
324+
mutation($worker_pk:PublicKey!, $fee:UInt64!){
325+
setSnarkWorker(input: {publicKey:$worker_pk}) {
326+
lastSnarkWorker
327+
}
328+
setSnarkWorkFee(input: {fee:$fee})
329+
}'''
330+
variables = {
331+
"worker_pk": worker_pk,
332+
"fee": fee
325333
}
326-
'''
327-
res = self._send_query(query)
334+
res = self._send_mutation(query, variables)
328335
return res["data"]
329336

330337
def create_wallet(self) -> dict:

0 commit comments

Comments
 (0)