When we fail to generate a block, discard pending transactions (which
likely caused the failure) so we don't fail to produce the next block.
This commit is contained in:
parent
5bd39c4be2
commit
ac9689691d
1 changed files with 2 additions and 0 deletions
|
|
@ -183,6 +183,8 @@ block_production_condition::block_production_condition_enum witness_plugin::bloc
|
||||||
{
|
{
|
||||||
elog("Got exception while generating block:\n${e}", ("e", e.to_detail_string()));
|
elog("Got exception while generating block:\n${e}", ("e", e.to_detail_string()));
|
||||||
result = block_production_condition::exception_producing_block;
|
result = block_production_condition::exception_producing_block;
|
||||||
|
elog("Discarding all pending transactions in an attempt to prevent the same error from occurring the next time we try to produce a block");
|
||||||
|
database().clear_pending();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( result )
|
switch( result )
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue