-
Notifications
You must be signed in to change notification settings - Fork 0
Merge bitcoin/bitcoin#25714: univalue: Avoid std::string copies #130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: backport-0.25-batch-244
Are you sure you want to change the base?
Merge bitcoin/bitcoin#25714: univalue: Avoid std::string copies #130
Conversation
fa09525 univalue: string_view test (MacroFake) 1111c7e univalue: Avoid std::string copies (MacroFake) Pull request description: This shouldn't matter too much, unless a really large string is pushed into a json struct, but I think it also clarifies the code. ACKs for top commit: martinus: Code review ACK bitcoin@fa09525 aureleoules: reACK fa09525 ryanofsky: Code review ACK fa09525 Tree-SHA512: 74c441912bd0b00cdb9ea7890121f71ae5d62a7594e7d29aa402c9e3f033710c5d3afb27a37c552e6513804b249aa37e375ce013a3db853a25d1fd7b6e6cd3a8
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Backport Verification - Structurally Correct but CI IssuesOriginal Bitcoin commit: Verification Results:
Analysis:This backport correctly implements Bitcoin's intent to avoid std::string copies through:
Size Validation Context:The 266% size ratio vs Bitcoin (30 lines) is explained by codebase structure differences:
This is architectural difference, not scope creep. Dash-Specific Adaptations (Correct):
CI Issues (Require Investigation):Multiple build failures across platforms suggest environment/toolchain issues rather than code problems:
Recommendation:This backport is technically sound and faithful to Bitcoin's intent. The CI failures should be investigated separately as they appear to be environmental rather than code-related. The optimization benefits and code quality improvements from Bitcoin are properly preserved in this implementation. |
Backports bitcoin#25714
Original commit: 59e00c7
Backported from Bitcoin Core v0.25
This change optimizes UniValue to avoid unnecessary std::string copies by:
The backport required adaptation to maintain Dash's bool return types for setter functions while still implementing the std::move optimizations.