0xB10C / miningpool-observer

Transparency for Mining Pool Transaction Selection
https://miningpool.observer
MIT License
55 stars 13 forks source link

Build warnings #39

Closed Sjors closed 2 years ago

Sjors commented 2 years ago

cargo 1.63.0 on Ubuntu 22.04.1 on master @ 39c48032b39d6df565723610c5aaa37fb689ca50

cargo build --release --bin miningpool-observer-daemon

...

   Compiling miningpool_observer_shared v0.1.0 (/home/miningobs/miningpool-observer/shared)
warning: derive helper attribute is used before it is introduced
  --> shared/src/model.rs:16:3
   |
16 | #[primary_key(hash)]
   |   ^^^^^^^^^^^
17 | #[derive(Queryable, Serialize, Identifiable)]
   |                                ------------ the attribute is introduced here
   |
   = note: `#[warn(legacy_derive_helpers)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>

   Compiling migrations_macros v1.4.2
   Compiling diesel_migrations v1.4.0
warning: `miningpool_observer_shared` (lib) generated 1 warning
warning: unused import: `std::convert::TryFrom`
 --> daemon/src/main.rs:2:5
  |
2 | use std::convert::TryFrom;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused imports: `PackedLockTime`, `Sequence`, `Witness`
  --> daemon/src/processing.rs:20:74
   |
20 | use bitcoin::{network::constants::Network, Address, Amount, Transaction, Sequence, PackedLockTime, Witness};
   |                                                                          ^^^^^^^^  ^^^^^^^^^^^^^^  ^^^^^^^

warning: unused `Result` that must be used
   --> daemon/src/main.rs:905:21
    |
905 |                     db::update_transaction_tags(&new_tags, &tx_in_db.txid.clone(), &conn);
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

warning: `miningpool-observer-daemon` (bin "miningpool-observer-daemon") generated 3 warnings
    Finished release [optimized] target(s) in 1m 03s
Sjors commented 2 years ago

Got some warnings in the web build too:

  Compiling trust-dns-resolver v0.19.7
   Compiling pest_derive v2.2.1
warning: derive helper attribute is used before it is introduced
  --> shared/src/model.rs:16:3
   |
16 | #[primary_key(hash)]
   |   ^^^^^^^^^^^
17 | #[derive(Queryable, Serialize, Identifiable)]
   |                                ------------ the attribute is introduced here
   |
   = note: `#[warn(legacy_derive_helpers)]` on by default
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #79202 <https://github.com/rust-lang/rust/issues/79202>

warning: `miningpool_observer_shared` (lib) generated 1 warning
   Compiling chrono-tz v0.6.3
   Compiling actix-testing v1.0.1
   Compiling actix-connect v2.0.0
   Compiling actix-http v2.2.2
   Compiling awc v2.0.3
   Compiling tera v1.16.0
   Compiling actix-web v3.3.3
   Compiling actix-files v0.5.0
warning: field `cnt` is never read
   --> web/src/db.rs:462:5
    |
460 | struct MissingTransactionCountInfo {
    |        --------------------------- field in this struct
461 |     #[sql_type = "BigInt"]
462 |     cnt: i64,
    |     ^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default
    = note: `MissingTransactionCountInfo` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis

warning: `miningpool-observer-web` (bin "miningpool-observer-web") generated 1 warning
    Finished release [optimized] target(s) in 1m 27s