PoW -> proof-of-work

This commit is contained in:
hinto.janai 2024-09-20 16:21:31 -04:00
parent c079f9e7c0
commit f0f15d921c
No known key found for this signature in database
GPG key ID: D47CE05FA175A499
3 changed files with 5 additions and 5 deletions

View file

@ -153,7 +153,7 @@ impl PreparedBlock {
/// Creates a new [`PreparedBlock`] from a [`PreparedBlockExPow`].
///
/// This function will give an invalid `PoW` hash if `randomx_vm` is not initialised
/// This function will give an invalid proof-of-work hash if `randomx_vm` is not initialised
/// with the correct seed.
///
/// # Panics

View file

@ -36,7 +36,7 @@ use crate::{
///
/// Returns [`AltBlockInformation`], which contains the cumulative difficulty of the alt chain.
///
/// This function only checks the block's `PoW` and its weight.
/// This function only checks the block's proof-of-work and its weight.
pub(crate) async fn sanity_check_alt_block<C>(
block: Block,
txs: HashMap<[u8; 32], TransactionVerificationData>,

View file

@ -1,6 +1,6 @@
//! `RandomX` VM Cache
//!
//! This module keeps track of the `RandomX` VM to calculate the next blocks `PoW`, if the block needs a randomX VM and potentially
//! This module keeps track of the `RandomX` VM to calculate the next blocks proof-of-work, if the block needs a randomX VM and potentially
//! more VMs around this height.
//!
use std::{
@ -69,7 +69,7 @@ impl RandomX for RandomXVm {
}
}
/// The randomX VMs cache, keeps the VM needed to calculate the current block's `PoW` hash (if a VM is needed) and a
/// The randomX VMs cache, keeps the VM needed to calculate the current block's proof-of-work hash (if a VM is needed) and a
/// couple more around this VM.
#[derive(Clone, Debug)]
pub(crate) struct RandomXVmCache {
@ -221,7 +221,7 @@ impl RandomXVmCache {
/// Add a new block to the VM cache.
///
/// hash is the block hash not the blocks `PoW` hash.
/// hash is the block hash not the blocks proof-of-work hash.
pub(crate) fn new_block(&mut self, height: usize, hash: &[u8; 32]) {
if is_randomx_seed_height(height) {
tracing::debug!("Block {height} is a randomX seed height, adding it to the cache.",);