Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update confirmation height in another thread (#1877)
* Move confirmation height updating to another thread * Fix Linux/gcc build * Formatting * Re-add equal comparison * Use pessimistic approach for updating confirmation heights * Pop pending confirmation before using it (like previously) * Add confirmation height stats * Add to memory stats RPC * Rename confirmation_height_processor.hpp/cpp to remove underscores * Add minor optimization to reuse a potential unncessary read * Fix build removing underscores when including the files * Change open_receive to receive to improve readability * Check if processor is stopped and exit early in inner do-while loop * Revert to checking active roots by default if ledger.blocks_confirmed returns false * Use node store not wallet in wallet_pending * Change back to using underscores for filenames * Only start confirming frontiers when there aren't many confirmations pending already * Formatting * Forgot to add the newly extracted pending_confirmation_height to the node's memory stats * Memory stats RPC can take a while if the confirmation height processor is on a long chain * Add CLI --debug_block_cemented_count * Add break to confirmation_height_processing thread name setting * Check confirmation height processing queue in RPCs block_info and blocks_info when returning confirmed status * Write in batches * Fix assert build issue * Add "include_only_confirmed" option to rpc tests * Fix num_blocks_process issue * Add tests for recursive chains, long chains and all block types * Formatting * Use new helper function in various places to check whether a block has been confirmed * Review comments * Formatting * Protect the current hash * Update comment placement * Correctly confirm all the blocks before the first encountered receive block starting from the original block being confirmed * Make sure lock () is always set when exiting do while loop * Replace std::mutex for receive_source_pairs with a cached atomic with the size * Remove ledger dependency * Add unstable/debug RPC command confirmation_height_currently_processing to see what hash is currently ungoing confirmation height processing * Send intentionally unpocketed transactions to a new account to prevent the tested accounts auto receiving the blocks * Make the last confirmation part of the do-while loop * Check for is_zero and epoch link * Make sure the confirmation height processing is done before sending the RPC request to reduce timing issues with ci. * Give all parameters _a suffix * Make block_confirmed in rpc_handler have a single return at end * Make receive_source_pairs_size == 0 an assert instead of release_assert * Formatting * Formatting
- Loading branch information