Skip to content

Commit

Permalink
api changes
Browse files Browse the repository at this point in the history
fee changes
  • Loading branch information
habanoz committed Sep 25, 2019
1 parent 98c07a4 commit 6acbf9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fee.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
fee=1274

[KTTX]
storage_limit=0
gas_limit=10200
storage_limit=300
gas_limit=10300
base=100
3 changes: 3 additions & 0 deletions src/pay/batch_payer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
FORGE_JSON = '{"branch": "%BRANCH%","contents":[%CONTENT%]}'
RUNOPS_JSON = '{"branch": "%BRANCH%","contents":[%CONTENT%], "signature":"edsigtXomBKi5CTRf5cjATJWSyaRvhfYNHqSUGrn4SdbYRcGwQrUGjzEfQDTuqHhuA8b2d8NarZjz8TRf65WkpQmo423BtomS8Q"}'
PREAPPLY_JSON = '[{"protocol":"%PROTOCOL%","branch":"%BRANCH%","contents":[%CONTENT%],"signature":"%SIGNATURE%"}]'
JSON_WRAP='{"operation": "%JSON%","chain_id":["%chain_id%"}'
COMM_FORGE = " rpc post http://%NODE%/chains/main/blocks/head/helpers/forge/operations with '%JSON%'"
COMM_RUNOPS = " rpc post http://%NODE%/chains/main/blocks/head/helpers/scripts/run_operation with '%JSON%'"
COMM_PREAPPLY = " rpc post http://%NODE%/chains/main/blocks/head/helpers/preapply/operations with '%JSON%'"
Expand Down Expand Up @@ -230,6 +231,7 @@ def attempt_single_batch(self, payment_records, op_counter, verbose=None, dry_ru
_, response = self.wllt_clnt_mngr.send_request(self.comm_head, verbose_override=False)
head = parse_json_response(response)
branch = head["hash"]
chain_id = head["chain_id"]
protocol = head["metadata"]["protocol"]

logger.debug("head: branch {} counter {} protocol {}".format(branch, op_counter.get(), protocol))
Expand Down Expand Up @@ -260,6 +262,7 @@ def attempt_single_batch(self, payment_records, op_counter, verbose=None, dry_ru
# run the operations
logger.debug("Running {} operations".format(len(content_list)))
runops_json = RUNOPS_JSON.replace('%BRANCH%', branch).replace("%CONTENT%", contents_string)
runops_json = JSON_WRAP.replace("%JSON%", runops_json).replace("%chain_id%",chain_id)
runops_command_str = self.comm_runops.replace("%JSON%", runops_json)

# if verbose: print("--> runops_command_str is |{}|".format(runops_command_str))
Expand Down

0 comments on commit 6acbf9b

Please sign in to comment.