Skip to content

Commit

Permalink
Merge pull request #273 from stevenroose/spv-validate
Browse files Browse the repository at this point in the history
Rename BlockHeader::spv_validate to validate_pow
  • Loading branch information
TheBlueMatt committed Jun 7, 2019
2 parents 5d7e6bb + 093d60b commit 860e74e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/blockdata/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,8 @@ impl BlockHeader {
(max_target(network) / self.target()).low_u64()
}

/// Performs an SPV validation of a block, which confirms that the proof-of-work
/// is correct, but does not verify that the transactions are valid or encoded
/// correctly.
pub fn spv_validate(&self, required_target: &Uint256) -> Result<(), util::Error> {
/// Checks that the proof-of-work for the block is valid.
pub fn validate_pow(&self, required_target: &Uint256) -> Result<(), util::Error> {
use byteorder::{ByteOrder, LittleEndian};

let target = &self.target();
Expand Down

0 comments on commit 860e74e

Please sign in to comment.