Skip to content

Commit

Permalink
Ensure stake nDoS propagates to block nDoS
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescowens committed Apr 23, 2024
1 parent cbe8404 commit 0071835
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2137,10 +2137,10 @@ bool AcceptBlock(CBlock& block, bool generated_by_me) EXCLUSIVE_LOCKS_REQUIRED(c
CTxDB txdb("r");
if(!GRC::CheckProofOfStakeV8(txdb, pindexPrev, block, generated_by_me, hashProof))
{
return error("%s: invalid proof-of-stake for block %s, prev %s",
__func__,
hash.ToString(),
pindexPrev->GetBlockHash().ToString());
return block.DoS(block.vtx[1].nDoS, error("%s: invalid proof-of-stake for block %s, prev %s",
__func__,
hash.ToString(),
pindexPrev->GetBlockHash().ToString()));
}

if (g_seen_stakes.ContainsProof(hashProof)
Expand Down

0 comments on commit 0071835

Please sign in to comment.