From 76b29fdf94a4b20d5aa56228270d40193cc7bbbd Mon Sep 17 00:00:00 2001
From: Roman Khlopkov <roman.khlopkov@demlabs.net>
Date: Wed, 16 Mar 2022 09:15:14 +0300
Subject: [PATCH] [*] Ledger wrap change

---
 .../cellframe-sdk/chain/include/wrapping_dap_chain_ledger.h   | 4 ++--
 modules/cellframe-sdk/chain/src/wrapping_dap_chain_ledger.c   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/cellframe-sdk/chain/include/wrapping_dap_chain_ledger.h b/modules/cellframe-sdk/chain/include/wrapping_dap_chain_ledger.h
index 51a47d75..c8b61d31 100644
--- a/modules/cellframe-sdk/chain/include/wrapping_dap_chain_ledger.h
+++ b/modules/cellframe-sdk/chain/include/wrapping_dap_chain_ledger.h
@@ -29,7 +29,7 @@ PyObject *dap_chain_ledger_set_local_cell_id_py(PyObject *self, PyObject *args);
 PyObject *dap_chain_node_datum_tx_calc_hash_py(PyObject *self, PyObject *args);
 PyObject *dap_chain_ledger_tx_add_py(PyObject *self, PyObject *args);
 PyObject *dap_chain_ledger_token_add_py(PyObject *self, PyObject *args);
-PyObject *dap_chain_ledger_token_emission_add_py(PyObject *self, PyObject *args);
+PyObject *dap_chain_ledger_token_emission_load_py(PyObject *self, PyObject *args);
 PyObject *dap_chain_ledger_token_emission_find_py(PyObject *self, PyObject *args);
 PyObject *dap_chain_ledger_tx_get_token_ticker_by_hash_py(PyObject *self, PyObject *args);
 PyObject *dap_chain_ledger_addr_get_token_ticker_all_py(PyObject *self, PyObject *args);
@@ -54,7 +54,7 @@ static PyMethodDef DapChainLedgerMethods[] = {
     {"nodeDatumTxCalcHash", (PyCFunction)dap_chain_node_datum_tx_calc_hash_py, METH_VARARGS, ""},
     {"txAdd", (PyCFunction)dap_chain_ledger_tx_add_py, METH_VARARGS, ""},
     {"tokenAdd", (PyCFunction)dap_chain_ledger_token_add_py, METH_VARARGS, ""},
-    {"tokenEmissionAdd", (PyCFunction)dap_chain_ledger_token_emission_add_py, METH_VARARGS, ""},
+    {"tokenEmissionLoad", (PyCFunction)dap_chain_ledger_token_emission_load_py, METH_VARARGS, ""},
     {"tokenEmissionFind", (PyCFunction)dap_chain_ledger_token_emission_find_py, METH_VARARGS, ""},
     {"txGetTokenTickerByHash", (PyCFunction)dap_chain_ledger_tx_get_token_ticker_by_hash_py, METH_VARARGS, ""},
     {"addrGetTokenTickerAll", (PyCFunction)dap_chain_ledger_addr_get_token_ticker_all_py, METH_VARARGS, ""},
diff --git a/modules/cellframe-sdk/chain/src/wrapping_dap_chain_ledger.c b/modules/cellframe-sdk/chain/src/wrapping_dap_chain_ledger.c
index a18deeb3..6a1c4eb4 100644
--- a/modules/cellframe-sdk/chain/src/wrapping_dap_chain_ledger.c
+++ b/modules/cellframe-sdk/chain/src/wrapping_dap_chain_ledger.c
@@ -49,12 +49,12 @@ PyObject *dap_chain_ledger_token_add_py(PyObject *self, PyObject *args)
                                          ((PyDapChainDatumTokenObject*)token)->token, token_size);
     return PyLong_FromLong(res);
 }
-PyObject *dap_chain_ledger_token_emission_add_py(PyObject *self, PyObject *args){
+PyObject *dap_chain_ledger_token_emission_load_py(PyObject *self, PyObject *args){
     PyObject *token_emission;
     size_t token_emissiom_size;
     if (!PyArg_ParseTuple(args, "O|n", &token_emission, &token_emissiom_size))
         return NULL;
-    int res = dap_chain_ledger_token_emission_add(((PyDapChainLedgerObject*)self)->ledger, (byte_t *)((PyDapChainDatumTokenEmissionObject*)token_emission)->token_emission, token_emissiom_size);
+    int res = dap_chain_ledger_token_emission_load(((PyDapChainLedgerObject*)self)->ledger, (byte_t *)((PyDapChainDatumTokenEmissionObject*)token_emission)->token_emission, token_emissiom_size);
     return PyLong_FromLong(res);
 }
 PyObject *dap_chain_ledger_token_emission_find_py(PyObject *self, PyObject *args){
-- 
GitLab