![]() |
|
[C] XMRIG C++ function >> Python 3.8 function (monero pool job) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] XMRIG C++ function >> Python 3.8 function (monero pool job) (/showthread.php?tid=6192699) |
XMRIG C++ function >> Python 3.8 function (monero pool job) - Fhack - Feb 8, 2022 Hello i've opened a thread lately about converting a function in xmrig to a python version of it. I rewrote a thread with better presentation including all the needed c++ code to understand how the function works and the actual python version of it i've coded. The code just basically get a job from a monero pool and then try to extract tx count of the block from the "blob" an hexadecimal string. Here the c++ code : Code uint32_t xmrig::Job::getNumTransactions() constCode bool xmrig::Job::setBlob(const char *blob)Cvt::fromHex is just sodium_hex2bin function in c++ i tought the equivalent in python is bytesarray.fromhex(self.blob) Here the python version i've coded : Code def _getNumTransactions(self):It sometimes return the right tx count with 1 more tx and sometimes a completly wrong number ! something should went wrong with type casting or hexadecimal to bytes conversion. Looking for some help to get the exact tx count from the actual height job ! Regards ✌ RE: XMRIG C++ function >> Python 3.8 function (monero pool job) - Fhack - Feb 12, 2022 Nobody have the solution still stuck on it !? RE: XMRIG C++ function >> Python 3.8 function (monero pool job) - vmpvirtualziersimp - Feb 12, 2022 rename your user title to "incompetent developer" RE: XMRIG C++ function >> Python 3.8 function (monero pool job) - Fhack - Feb 13, 2022 (Feb 12, 2022 03:59 PM)vmpvirtualziersimp Wrote: rename your user title to "incompetent developer" show me the solution of your so great intelligence son of a bitch, i'm not good in math and assembly logic, that's why i'm asking for help, at least i know my weak, your a coard to say this behind a computer. RE: XMRIG C++ function >> Python 3.8 function (monero pool job) - Fhack - Mar 2, 2022 Nobody have the solution ? |