Uninitialized block status should be invalid
This commit is contained in:
parent
76de7eea48
commit
7cad3fe641
3 changed files with 7 additions and 1 deletions
|
|
@ -486,6 +486,11 @@ nano::block_status nano::block_processor::process_one (secure::write_transaction
|
|||
logger.debug (nano::log::type::block_processor, "Block has insufficient work: {}", hash);
|
||||
break;
|
||||
}
|
||||
case nano::block_status::invalid:
|
||||
{
|
||||
debug_assert (false, "invalid block status"); // This should never happen
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ namespace confirmation_height
|
|||
|
||||
enum class block_status
|
||||
{
|
||||
invalid, // Status is unknown, block is not processed yet (default value)
|
||||
progress, // Hasn't been seen before, signed correctly
|
||||
bad_signature, // Signature was bad, forged or transmission error
|
||||
old, // Already seen and was valid
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
nano::secure::write_transaction const & transaction;
|
||||
nano::ledger & ledger;
|
||||
nano::block_status result;
|
||||
nano::block_status result{ nano::block_status::invalid };
|
||||
|
||||
private:
|
||||
bool validate_epoch_block (nano::state_block const & block);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue