X-Git-Url: https://git.novaco.in/?p=NovacoinLibrary.git;a=blobdiff_plain;f=Novacoin%2FCBlockStore.cs;h=279edc7245e07706ff6d94658031ba2ee69be05e;hp=6753bfe636242b7dbd0ccfae0939da6794576679;hb=729e4ae7db34bd869fab8079f08968175fe3e5e8;hpb=3aae916a057b494e197fc0adaaa5656880090565
diff --git a/Novacoin/CBlockStore.cs b/Novacoin/CBlockStore.cs
index 6753bfe..279edc7 100644
--- a/Novacoin/CBlockStore.cs
+++ b/Novacoin/CBlockStore.cs
@@ -76,11 +76,6 @@ namespace Novacoin
public byte nEntropyBit { get; set; }
///
- /// Next block hash
- ///
- public byte[] NextHash { get; set; }
-
- ///
/// Block height
///
public uint nHeight { get; set; }
@@ -501,9 +496,9 @@ namespace Novacoin
public bool AcceptBlock(ref CBlock block)
{
- uint256 hash = block.header.Hash;
+ uint256 nHash = block.header.Hash;
- if (blockMap.ContainsKey(hash))
+ if (blockMap.ContainsKey(nHash))
{
// Already have this block.
return false;
@@ -542,7 +537,8 @@ namespace Novacoin
// Write block to file.
var itemTemplate = new CBlockStoreItem()
{
- nHeight = nHeight
+ nHeight = nHeight,
+ nEntropyBit = Entropy.GetStakeEntropyBit(nHeight, nHash)
};
itemTemplate.FillHeader(block.header);