Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the potential risk to get null CurrentHeaderHash from Blockchain (2x) #1030

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions neo/Ledger/Blockchain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,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