X-Git-Url: https://git.novaco.in/?p=NovacoinLibrary.git;a=blobdiff_plain;f=Novacoin%2FCheckpoints.cs;fp=Novacoin%2FCheckpoints.cs;h=5b874eab280742f9ac4916e01251e144d2649c76;hp=73854b74dad48c19ad1243e119fe875d5dd9a67d;hb=b0714a7418f2a8ff09904d1dc014c0ad46ef64c3;hpb=7d59deb2e70c69cad8526523f90b3fbdbfe40e17 diff --git a/Novacoin/Checkpoints.cs b/Novacoin/Checkpoints.cs index 73854b7..5b874ea 100644 --- a/Novacoin/Checkpoints.cs +++ b/Novacoin/Checkpoints.cs @@ -2,7 +2,7 @@ using System; namespace Novacoin { - public class Checkpoints + public static class HashCheckpoints { private static Tuple[] checkpoints = new Tuple[] { @@ -39,4 +39,35 @@ namespace Novacoin return true; } } + + public static class ModifierCheckpoints + { + /// + /// Stake modifier checkpoints + /// + private static Tuple[] modifierCheckpoints = new Tuple[] + { + new Tuple( 0, 0x0e00670bu ), + new Tuple(200000, 0x01ec1503u ) + }; + + /// + /// Check stake modifier checkpoints. + /// + /// Block height. + /// Modifier checksum value. + /// Result + public static bool Verify(uint nHeight, uint nStakeModifierChecksum) + { + foreach (var checkpoint in modifierCheckpoints) + { + if (checkpoint.Item1 == nHeight) + { + return checkpoint.Item2 == nStakeModifierChecksum; + } + } + + return true; + } + } } \ No newline at end of file