Closed jackzhhuang closed 1 month ago
The pull request modifies the find_absent_ancestor
function in the block_sync_task.rs
file, changing its return type from Result<()>
to Result<u64>
. This allows the function to return a count of absent blocks instead of a simple success indication. The internal logic has been updated to track this count and return it appropriately. Additionally, the calling code has been adjusted to handle the new return type, affecting how absent blocks are processed.
File | Change Summary |
---|---|
sync/src/tasks/block_sync_task.rs | Updated find_absent_ancestor method signature to return Result<u64> instead of Result<()> . Introduced a count variable to track absent blocks and modified logic to return this count. Adjusted calling code to handle new return type. |
block_sync_task.rs
file, specifically related to the handling of absent blocks, which is closely related to the changes made in the find_absent_ancestor
function regarding the tracking and processing of absent blocks.In the code where blocks do play,
A count of absents found their way.
With each loop's turn, the tally grew,
A helpful change, both bright and new.
So hop along, let data flow,
For absent blocks, we now will know! 🐇✨
[!WARNING]
Review ran into problems
🔥 Problems
Error running Gitleaks: Command failed with exit code 4: jk_cp -o -f -k -j /cache/52/1cc2eb94-ff6c-413d-81b8-661342020586 /dev/null /dev/urandom /usr/bin/ast-grep /usr/bin/curl /usr/bin/diff /usr/bin/dirname /usr/bin/env /usr/bin/fd /usr/bin/gawk /usr/bin/gh /usr/bin/jq /usr/bin/patch /usr/bin/rg /usr/bin/shellcheck /usr/bin/tokei /usr/bin/tree /usr/bin/uniq /usr/bin/xargs /etc/ssl/certs /etc/passwd /etc/group /home/jailuser/ast-grep-rules ERROR: /usr/bin/ast-grep does not exist Usage: /usr/sbin/jk_cp -j[OPTIONS] -h --help : this help screen -j, --jail : the jail to copy to -v, --verbose : show what is being copied -f, --force : overwrite existing files -k, --hardlink : use hardlinks if possible -o, --owner : retain file ownership and group -s, --setuid : retain file setuid/setgid bits Note: if no jail is specified, the first argument is considered to be the jail --- Error running semgrep: Cloning the repository previously failed. --- Git: Failed to clone repository. Please run the `@coderabbitai full review` command to re-trigger a full review.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
…f no absent block exists.
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
-
-
Other information
Summary by CodeRabbit
New Features
Bug Fixes