Merge rust-bitcoin/rust-bitcoin#1728: Run cargo +nightly rustfmt

5781896814 Run cargo +nightly rustfmt (Tobin C. Harding)

Pull request description:

  We just merged a patch to enable formatting in CI but commit: `05fdead2 Feature: Add difficulty_float method for block::Header.` must have slipped in.

  Run the formatter.

ACKs for top commit:
  Kixunil:
    ACK 5781896814
  apoelstra:
    ACK 5781896814

Tree-SHA512: 7e97b5d56610ec9771ede30533e491e410ce79441070c8ff22f2e3d7fefc23fe327eb5ce3325ee3e356fc940c8e47806816a628daaa44b463071124beee2fbeb
This commit is contained in:
Andrew Poelstra 2023-03-22 14:45:17 +00:00
commit 0f98c56962
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 1 additions and 3 deletions

View File

@ -69,9 +69,7 @@ impl Header {
pub fn difficulty(&self) -> u128 { self.target().difficulty() } pub fn difficulty(&self) -> u128 { self.target().difficulty() }
/// Computes the popular "difficulty" measure for mining and returns a float value of f64. /// Computes the popular "difficulty" measure for mining and returns a float value of f64.
pub fn difficulty_float(&self) -> f64 { pub fn difficulty_float(&self) -> f64 { self.target().difficulty_float() }
self.target().difficulty_float()
}
/// Checks that the proof-of-work for the block is valid, returning the block hash. /// Checks that the proof-of-work for the block is valid, returning the block hash.
pub fn validate_pow(&self, required_target: Target) -> Result<BlockHash, Error> { pub fn validate_pow(&self, required_target: Target) -> Result<BlockHash, Error> {