Skip to content
Snippets Groups Projects
Commit b83342b2 authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[*] Moved from the features-5386 pkeyHash branch to the Sign class.

parent 1e2c2c92
No related branches found
No related tags found
4 merge requests!69Hotfix - fixed wrapping function dap_chain_ledger_tx_get_token_ticker_by_hash,!68hotfix-4954,!66Made a number of changes that were required to change the work in the blockchain explorer.,!65hotfix-4954
......@@ -86,11 +86,13 @@ typedef struct PyDapSign{
PyObject *wrapping_dap_sign_get_type(PyObject *self, void *closure);
PyObject *wrapping_dap_sign_get_pkey(PyObject *self, void *closure);
PyObject *wrapping_dap_sign_get_pkey_hash(PyObject *self, void *closure);
PyObject *wrapping_dap_sign_get_size(PyObject *self, void *closure);
static PyGetSetDef DapSignObjectGetsSetsDef[] = {
{"type", (getter)wrapping_dap_sign_get_type, NULL, NULL, NULL},
{"pkey", (getter)wrapping_dap_sign_get_pkey, NULL, NULL, NULL},
{"pkeyHash", (getter)wrapping_dap_sign_get_pkey_hash, NULL,NULL, NULL},
{"size", (getter)wrapping_dap_sign_get_size, NULL, NULL, NULL},
{NULL}
};
......
......@@ -18,6 +18,14 @@ PyObject *wrapping_dap_sign_get_pkey(PyObject *self, void *closure){
obj_pkey->pkey = (dap_pkey_t*)((PyDapSignObject*)self)->sign->pkey_n_sign;
return (PyObject*)obj_pkey;
}
PyObject *wrapping_dap_sign_get_pkey_hash(PyObject *self, void *closure){
(void)closure;
PyDapHashFastObject *obj_hash = PyObject_New(PyDapHashFastObject, &DapHashFastObject_DapHashFastObjectType);
PyObject_Dir((PyObject*)obj_hash);
obj_hash->hash_fast = DAP_NEW(dap_chain_hash_fast_t);
dap_sign_get_pkey_hash(((PyDapSignObject*)self)->sign, obj_hash->hash_fast);
return (PyObject*)obj_hash;
}
PyObject *wrapping_dap_sign_get_size(PyObject *self, void *closure){
(void)closure;
return Py_BuildValue("I", ((PyDapSignObject*)self)->sign->header.sign_size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment