Skip to content

Commit 3519265

Browse files
authored
[CHIA-3717] improve logging of NO_OVERFLOWS_IN_FIRST_SUB_SLOT_NEW_EPOCH (#20016)
improve logging of NO_OVERFLOWS_IN_FIRST_SUB_SLOT_NEW_EPOCH
1 parent c1edd89 commit 3519265

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

chia/full_node/full_node_api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
from chia.types.peer_info import PeerInfo
7373
from chia.util.batches import to_batches
7474
from chia.util.db_wrapper import SQLITE_MAX_VARIABLE_NUMBER
75+
from chia.util.errors import Err, ValidationError
7576
from chia.util.hash import std_hash
7677
from chia.util.limited_semaphore import LimitedSemaphoreFullError
7778
from chia.util.task_referencer import create_referenced_task
@@ -1133,6 +1134,12 @@ async def signed_values(
11331134
try:
11341135
await self.full_node.add_unfinished_block(new_candidate, None, True)
11351136
except Exception as e:
1137+
if isinstance(e, ValidationError) and e.code == Err.NO_OVERFLOWS_IN_FIRST_SUB_SLOT_NEW_EPOCH:
1138+
self.full_node.log.info(
1139+
f"Failed to farm block {e}. Consensus rules prevent this block from being farmed. Not retrying"
1140+
)
1141+
return None
1142+
11361143
# If we have an error with this block, try making an empty block
11371144
self.full_node.log.error(f"Error farming block {e} {new_candidate}")
11381145
candidate_tuple = self.full_node.full_node_store.get_candidate_block(

0 commit comments

Comments
 (0)