From 7d59deb2e70c69cad8526523f90b3fbdbfe40e17 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Sat, 12 Sep 2015 15:03:56 +0300 Subject: [PATCH] Use Checkpoints.Verify to verify whether hash contradicts the table of checkpoints or not. --- Novacoin/CBlockStore.cs | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Novacoin/CBlockStore.cs b/Novacoin/CBlockStore.cs index 25ea3bb..cca056e 100644 --- a/Novacoin/CBlockStore.cs +++ b/Novacoin/CBlockStore.cs @@ -1072,6 +1072,12 @@ namespace Novacoin } } + // Check that the block chain matches the known block chain up to a checkpoint + if (!Checkpoints.Verify(nHeight, nHash)) + { + return false; // rejected by checkpoint lock-in + } + // TODO: Enforce rule that the coinbase starts with serialized block height // Write block to file. -- 1.7.1