diff --git a/include/wrapping_dap_chain_datum.h b/include/wrapping_dap_chain_datum.h index 784bd6979ab84d497fc6451828f61f8db4dbfea8..16ff7a38025bf8a5110791d1ae896f242c91c22c 100644 --- a/include/wrapping_dap_chain_datum.h +++ b/include/wrapping_dap_chain_datum.h @@ -62,7 +62,7 @@ typedef struct PyDapChainDatum{ }PyDapChainDatumObject; //void PyDapChainDatumObject_dealloc(PyDapChainDatumObject* object); -PyObject *DapChainDatumObject_new(PyTypeObject *type_object, PyObject *args, PyObject *kwds); +PyObject *PyDapChainDatumObject_new(PyTypeObject *type_object, PyObject *args, PyObject *kwds); static PyTypeObject DapChainDatumObject_DapChainDatumObjectType = { PyVarObject_HEAD_INIT(NULL, 0) @@ -103,7 +103,7 @@ static PyTypeObject DapChainDatumObject_DapChainDatumObjectType = { 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ - DapChainDatumObject_new, /* tp_new */ + PyDapChainDatumObject_new, /* tp_new */ }; /* -------------------------------- */ diff --git a/src/wrapping_dap_chain_ledger.c b/src/wrapping_dap_chain_ledger.c index 76248e83cf16645e46ff0112d4203343a476ff35..d4cbc2dc0021fd206dc8c48f07b6769d248e7ddd 100644 --- a/src/wrapping_dap_chain_ledger.c +++ b/src/wrapping_dap_chain_ledger.c @@ -66,11 +66,14 @@ PyObject *dap_chain_ledger_token_emission_find_py(PyObject *self, PyObject *args return Py_BuildValue("O", &token_emission); } PyObject *dap_chain_ledger_tx_get_token_ticker_by_hash_py(PyObject *self, PyObject *args){ - PyObject *obj_tx_hash; - if (!PyArg_ParseTuple(args, "O", &obj_tx_hash)) - return NULL; - const char *res = dap_chain_ledger_tx_get_token_ticker_by_hash(((PyDapChainHashFastObject*)obj_tx_hash)->hash_fast); - return Py_BuildValue("s", res); + //TODO + //Missing implementation of dap_chain_ledger_tx_get_token_ticker_by_hash function in dap_chain_ledger + return NULL; +// PyObject *obj_tx_hash; +// if (!PyArg_ParseTuple(args, "O", &obj_tx_hash)) +// return NULL; +// const char *res = dap_chain_ledger_tx_get_token_ticker_by_hash(((PyDapChainHashFastObject*)obj_tx_hash)->hash_fast); +// return Py_BuildValue("s", res); } PyObject *dap_chain_ledger_addr_get_token_ticker_all_py(PyObject *self, PyObject *args){ PyObject *obj_addr; @@ -118,19 +121,22 @@ PyObject *dap_chain_ledger_tx_cache_check_py(PyObject *self, PyObject *args){ return PyLong_FromLong(res); } PyObject *dap_chain_node_datum_tx_cache_check_py(PyObject *self, PyObject *args){ - PyObject *obj_datum_tx; - PyObject *list_bound_items; - if (!PyArg_ParseTuple(args, "O|O", &obj_datum_tx, &list_bound_items)) - return NULL; - Py_ssize_t size = PyList_Size(list_bound_items); - dap_list_t **bound_items = calloc(sizeof (dap_list_t**), (size_t)size); - for (int i = 0; i < size ; i++){ - PyObject *obj = PyList_GetItem(list_bound_items, i); - dap_list_t *l = pyListToDapList(obj); - bound_items[i] = l; - } - int res = dap_chain_node_datum_tx_cache_check(((PyDapChainDatumTxObject*)obj_datum_tx)->datum_tx, bound_items); - return PyLong_FromLong(res); + //TODO + //Missing implementation of dap_chain_node_datum_tx_cache_check function in dap_chain_ledger + return NULL; +// PyObject *obj_datum_tx; +// PyObject *list_bound_items; +// if (!PyArg_ParseTuple(args, "O|O", &obj_datum_tx, &list_bound_items)) +// return NULL; +// Py_ssize_t size = PyList_Size(list_bound_items); +// dap_list_t **bound_items = calloc(sizeof (dap_list_t**), (size_t)size); +// for (int i = 0; i < size ; i++){ +// PyObject *obj = PyList_GetItem(list_bound_items, i); +// dap_list_t *l = pyListToDapList(obj); +// bound_items[i] = l; +// } +// int res = dap_chain_node_datum_tx_cache_check(((PyDapChainDatumTxObject*)obj_datum_tx)->datum_tx, bound_items); +// return PyLong_FromLong(res); } PyObject *dap_chain_ledger_tx_remove_py(PyObject *self, PyObject *args){ PyObject *obj_h_fast;