diff options
| author | Thomas Winget <tewinget@gmail.com> | 2015-01-09 05:56:51 -0500 |
|---|---|---|
| committer | Thomas Winget <tewinget@gmail.com> | 2015-01-09 05:56:51 -0500 |
| commit | 14555eefd5d2163fbd0cd892cf873b10d20b64b6 (patch) | |
| tree | d9611515db35a8babedcee707567925e7f294747 /src/cryptonote_core/checkpoints.cpp | |
| parent | 5086ca1db5bb05314e14597f006052f054a3f0d3 (diff) | |
| download | monzero-core-14555eefd5d2163fbd0cd892cf873b10d20b64b6.tar.gz monzero-core-14555eefd5d2163fbd0cd892cf873b10d20b64b6.tar.xz monzero-core-14555eefd5d2163fbd0cd892cf873b10d20b64b6.zip | |
Fixes segfault in Blockchain::handle_alternative_block
This commit should fix the segfault in
Blockchain::handle_alternative_block, and also updates a few comments
that were either incorrect or incomplete.
Diffstat (limited to 'src/cryptonote_core/checkpoints.cpp')
| -rw-r--r-- | src/cryptonote_core/checkpoints.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cryptonote_core/checkpoints.cpp b/src/cryptonote_core/checkpoints.cpp index 58edda7c9..e4223afb5 100644 --- a/src/cryptonote_core/checkpoints.cpp +++ b/src/cryptonote_core/checkpoints.cpp @@ -84,6 +84,10 @@ namespace cryptonote return check_block(height, h, ignored); } //--------------------------------------------------------------------------- + // this basically says if the blockchain is smaller than the first + // checkpoint then alternate blocks are allowed. Alternatively, if the + // last checkpoint *before* the end of the current chain is also before + // the block to be added, then this is fine. bool checkpoints::is_alternative_block_allowed(uint64_t blockchain_height, uint64_t block_height) const { if (0 == block_height) |
