Skip to content

Commit

Permalink
Fix the potential risk to get null CurrentHeaderHash from Blockchain (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yongjiema authored and vncoelho committed Aug 16, 2019
1 parent cf768c6 commit d959efc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neo/Ledger/Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public class FillCompleted { }
public Store Store { get; }
public MemoryPool MemPool { get; }
public uint Height => currentSnapshot.Height;
public uint HeaderHeight => (uint)header_index.Count - 1;
public uint HeaderHeight => currentSnapshot.HeaderHeight;
public UInt256 CurrentBlockHash => currentSnapshot.CurrentBlockHash;
public UInt256 CurrentHeaderHash => header_index[header_index.Count - 1];
public UInt256 CurrentHeaderHash => currentSnapshot.CurrentHeaderHash;

private static Blockchain singleton;
public static Blockchain Singleton
Expand Down

0 comments on commit d959efc

Please sign in to comment.