try to create foliage after ever eos for diagnostics

This commit is contained in:
William Blanke 2024-01-17 13:42:46 -08:00
parent c6d5f7fa1e
commit ae115e688a
No known key found for this signature in database
GPG Key ID: E663064A8D4B2767
2 changed files with 23 additions and 0 deletions

View File

@ -663,6 +663,24 @@ class FullNodeAPI:
) -> Optional[Message]:
if self.full_node.sync_store.get_sync_mode():
return None
async with self.full_node.blockchain.priority_mutex.acquire(priority=BlockchainMutexPriority.high):
peak: Optional[BlockRecord] = self.full_node.blockchain.get_peak()
if peak is not None:
# Finds the last transaction block before this one
curr_l_tb: BlockRecord = peak
while not curr_l_tb.is_transaction_block:
curr_l_tb = self.full_node.blockchain.block_record(curr_l_tb.prev_hash)
try:
mempool_bundle = self.full_node.mempool_manager.create_bundle_from_mempool(
curr_l_tb.header_hash
)
except Exception as e:
self.log.error(f"WJB Traceback: {traceback.format_exc()}")
self.full_node.log.error(f"WJB Error making spend bundle {e} peak: {peak}")
mempool_bundle = None
msg, _ = await self.full_node.add_end_of_sub_slot(request.end_of_slot_bundle, peer)
return msg

View File

@ -412,6 +412,10 @@ class Mempool:
item_cost + cost_sum > self.mempool_info.max_block_clvm_cost
or fee + fee_sum > DEFAULT_CONSTANTS.MAX_COIN_AMOUNT
):
log.info(
f"WJB item_cost {item_cost} + cost_sum {cost_sum} > self.mempool_info.max_block_clvm_cost {self.mempool_info.max_block_clvm_cost} or fee {fee} + fee_sum {fee_sum} > DEFAULT_CONSTANTS.MAX_COIN_AMOUNT {DEFAULT_CONSTANTS.MAX_COIN_AMOUNT}"
)
log.info(f"WJB name {name} fee {fee} item {item}")
break
coin_spends.extend(unique_coin_spends)
additions.extend(unique_additions)
@ -422,6 +426,7 @@ class Mempool:
except Exception as e:
log.debug(f"Exception while checking a mempool item for deduplication: {e}")
continue
log.info(f"WJB done")
if processed_spend_bundles == 0:
return None
log.info(