Skip to content

Commit e7bfad2

Browse files
Merge pull request #14 from c29r3/master
Added nextProposal to daemon status, set_current_snark_worker() implemented
2 parents ad1e650 + d41fc56 commit e7bfad2

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
@@ -138,6 +138,7 @@ def get_daemon_status(self) -> dict:
138138
snarkWorkFee
139139
syncStatus
140140
proposePubkeys
141+
nextProposal
141142
consensusTimeBestTip
142143
consensusTimeNow
143144
consensusMechanism
@@ -322,11 +323,17 @@ def set_current_snark_worker(self, worker_pk: str, fee: str) -> dict:
322323
dict -- Returns the "data" field of the JSON Response as a Dict
323324
"""
324325
query = '''
325-
{
326-
syncStatus
326+
mutation($worker_pk:PublicKey!, $fee:UInt64!){
327+
setSnarkWorker(input: {publicKey:$worker_pk}) {
328+
lastSnarkWorker
329+
}
330+
setSnarkWorkFee(input: {fee:$fee})
331+
}'''
332+
variables = {
333+
"worker_pk": worker_pk,
334+
"fee": fee
327335
}
328-
'''
329-
res = self._send_query(query)
336+
res = self._send_mutation(query, variables)
330337
return res["data"]
331338

332339
def create_wallet(self) -> dict:

0 commit comments

Comments
 (0)