Rename BlockHeader::spv_validate to validate_pow

This commit is contained in:
Steven Roose 2019-06-06 10:39:03 +01:00
parent 08c756d20e
commit 093d60bf7f
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 2 additions and 4 deletions

View File

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