Merge pull request #273 from stevenroose/spv-validate

Rename BlockHeader::spv_validate to validate_pow
This commit is contained in:
Matt Corallo 2019-06-07 08:24:47 -04:00 committed by GitHub
commit 860e74ecb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -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();