From 6acbf9be7fa12baba48b4dabf9421f2d3a298ef9 Mon Sep 17 00:00:00 2001 From: Huseyin ABANOZ Date: Wed, 25 Sep 2019 21:31:09 +0300 Subject: [PATCH] api changes fee changes --- fee.ini | 4 ++-- src/pay/batch_payer.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fee.ini b/fee.ini index 88bfa5da..6ebc6c60 100644 --- a/fee.ini +++ b/fee.ini @@ -2,6 +2,6 @@ fee=1274 [KTTX] -storage_limit=0 -gas_limit=10200 +storage_limit=300 +gas_limit=10300 base=100 diff --git a/src/pay/batch_payer.py b/src/pay/batch_payer.py index 6fd6113b..b0e39d68 100644 --- a/src/pay/batch_payer.py +++ b/src/pay/batch_payer.py @@ -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%'" @@ -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)) @@ -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))