revoxhere / duino-coin

ᕲ Duino-Coin is a coin that can be mined with almost everything, including Arduino boards.
https://duinocoin.com
MIT License
1.06k stars 513 forks source link

Warnings during compilation of libducohash on Windows, with Python 3.12.2 #1766

Open GerardoNevarez opened 3 months ago

GerardoNevarez commented 3 months ago

Describe the bug Warnings during compilation of libducohash on Windows, with Python 3.12.2, Current library download performed by the PC miner does not seem to be compatible with this Python version, and found a warning message during compilation

To Reproduce Steps to reproduce the behavior: Compile libducohash on Windows (rustup installed via scoop)

Expected behavior No warnings during compilations. To be clear the libra is compiled, but these warning could be easily fixed.

Screenshots/photos

   Compiling ducohasher v0.1.0 (C:\git\duino-coin\libducohash)
warning: use of deprecated method `pyo3::deprecations::GilRefs::<T>::function_arg`: use `&Bound<'_, T>` instead for this function argument
  --> src\lib.rs:43:31
   |
43 | fn libducohasher(_py: Python, m: &PyModule) -> PyResult<()> {
   |                               ^
   |
   = note: `#[warn(deprecated)]` on by default

warning: method `DUCOS1` should have a snake case name
  --> src\lib.rs:18:12
   |
18 |     pub fn DUCOS1(&mut self, expected_hash: &[u8], diff: u128, eff: u64) -> u128 {
   |            ^^^^^^ help: convert the identifier to snake case: `ducos1`
   |
   = note: `#[warn(non_snake_case)]` on by default

warning: `ducohasher` (lib) generated 2 warnings
    Finished release [optimized] target(s) in 44.25s

image

System (please complete the following information):

Additional context Everything worked after copying the DLL to the correct name and location copy target\release\ducohasher.dll ..\libducohasher.pyd

image

EinWildesPanda commented 3 months ago

Library "fixed" in https://github.com/EinWildesPanda/libducohash

PC_Miner.py certainly would need fixing (line 352), maybe others as well?