From 2025d22040ce79fc6a8fecdbb487b8c35c3b3594 Mon Sep 17 00:00:00 2001 From: Roman Khlopkov <roman.khlopkov@demlabs.net> Date: Wed, 9 Feb 2022 14:35:10 +0000 Subject: [PATCH] hotfix-5564 --- include/python-cellframe.h | 7 +++++++ .../common/include/wrapping_dap_chain_common.h | 4 ++++ .../net/srv/src/wrapping_dap_chain_net_srv_client.c | 2 +- .../net/srv/src/wrapping_dap_chain_net_srv_order.c | 3 ++- modules/dap-sdk/crypto/include/wrapping_dap_hash.h | 4 ++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/python-cellframe.h b/include/python-cellframe.h index a5042ee6..7989b685 100644 --- a/include/python-cellframe.h +++ b/include/python-cellframe.h @@ -36,6 +36,11 @@ #include "wrapping_dap_chain_net_node_client.h" #include "wrapping_dap_chain_net_node_info.h" #include "wrapping_dap_chain_net_state.h" +// === Chain net srv === +#include "wrapping_dap_chain_net_srv.h" +#include "wrapping_dap_chain_net_srv_client_remote.h" +#include "wrapping_dap_chain_net_srv_common.h" +#include "wrapping_dap_chain_net_srv_order.h" // ============ // === type DAG === #include "wrapping_dap_chain_cs_dag.h" @@ -50,6 +55,8 @@ #include "wrapping_dap_mempool.h" #include "wrapping_dap_http_folder.h" #include "dap_chain_wallet_python.h" +// === Chain GlobalDB === +#include "wrapping_dap_chain_global_db.h" //#include "dap_http_client_simple.h" //#include "dap_chain_wallet.h" diff --git a/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h b/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h index dec022f3..6eb1bb1b 100644 --- a/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h +++ b/modules/cellframe-sdk/common/include/wrapping_dap_chain_common.h @@ -280,6 +280,10 @@ static PyTypeObject DapChainNetSrvUIDObject_DapChainNetSrvUIDObjectType = { /*=================*/ +static bool PyDapChainNetSrvUid_Check(PyObject *a_obj){ + return PyObject_TypeCheck(a_obj, &DapChainNetSrvUIDObject_DapChainNetSrvUIDObjectType); +} + /* Chain net srv uid */ typedef struct PyDapChainNetSrvPriceUnitUID{ PyObject_HEAD diff --git a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_client.c b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_client.c index 1f077013..e8d314d2 100644 --- a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_client.c +++ b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_client.c @@ -76,7 +76,7 @@ int PyDapChainNetSrvClient_init(PyDapChainNetSrvClientObject* self, PyObject *ar PyObject *obj_net, *obj_hander; const char *addr; uint16_t port; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "OsH", (char *)kwlist, &obj_net, &addr, &port, &obj_hander)){ + if (!PyArg_ParseTupleAndKeywords(args, kwds, "OsH", (char **)kwlist, &obj_net, &addr, &port, &obj_hander)){ return -1; } if (!PyCallable_Check(obj_hander)){ diff --git a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c index dd28206d..02020a82 100644 --- a/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c +++ b/modules/cellframe-sdk/net/srv/src/wrapping_dap_chain_net_srv_order.c @@ -216,7 +216,8 @@ PyObject *wrapping_dap_chain_net_srv_order_delete(PyObject *self, PyObject *args return NULL; } -PyObject *wrapping_dap_chain_net_srv_order_find_all_by(PyObject *self, PyObject *args){} +PyObject *wrapping_dap_chain_net_srv_order_find_all_by(PyObject *self, PyObject *args){return Py_None;} + PyObject *wrapping_dap_chain_net_srv_order_save(PyObject *self, PyObject *args){ PyObject *obj_net; if(!PyArg_ParseTuple(args, "O", &obj_net)){ diff --git a/modules/dap-sdk/crypto/include/wrapping_dap_hash.h b/modules/dap-sdk/crypto/include/wrapping_dap_hash.h index 2cc38398..b5c05286 100644 --- a/modules/dap-sdk/crypto/include/wrapping_dap_hash.h +++ b/modules/dap-sdk/crypto/include/wrapping_dap_hash.h @@ -156,6 +156,10 @@ static PyTypeObject DapHashFastObject_DapHashFastObjectType = { PyType_GenericNew, /* tp_new */ }; +static bool PyDapHashFast_Check(PyObject *a_obj){ + return PyObject_TypeCheck(a_obj, &DapHashFastObject_DapHashFastObjectType); +} + #ifdef __cplusplus } #endif -- GitLab