Merge bitcoin/bitcoin#29055: tests, bench: Fix issue with CWallet::LoadWallet() being called in the wrong places#1037
Conversation
…() being called in the wrong places bd7f5d3 wallet: Assert that the wallet is not initialized in LoadWallet (Andrew Chow) fb0b6ca tests, bench: Remove incorrect LoadWallet() calls (Andrew Chow) Pull request description: `CWallet::LoadWallet()` expects to be called after a `CWallet` is constructed, but before any of its member functions called. Doing so invalidates pointers which causes issues with some PRs and branches that I am working on. This was being used incorrectly in a few tests and benchmarks, resulting in segfaults. As a precaution for this kind of issue in the future, I've also added a few asserts to `LoadWallet()` so that developers will notice when it is used incorrectly. As similar issue was fixed in bitcoin#27666 ACKs for top commit: S3RK: ACK bd7f5d3 furszy: ACK bd7f5d3 Tree-SHA512: 7664f12b8452994e7fc4d7d4f77697fb5f75edb0dba95ba99a4a23ec03d5b8e0ecbdcb7635547a0e8b4f89f708f98dcb5d039df0559e24b1ae411ed630e16e14
WalkthroughThe changes remove a call to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🧰 Additional context used📓 Path-based instructions (2)src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
**⚙️ CodeRabbit Configuration File
Files:
🧠 Learnings (4)📓 Common learnings📚 Learning: in dash backports from bitcoin core test files, the `address_to_scriptpubkey` function should be imp...Applied to files:
📚 Learning: during dash backport verification of bitcoin core commit 06d469c, scope creep was detected when a...Applied to files:
📚 Learning: during multiple verification attempts of bitcoin core commit 06d469c backport to dash pr #566, da...Applied to files:
🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Backport Verification - CATASTROPHIC FAILUREOriginal Bitcoin commit: CRITICAL VIOLATIONS DETECTED: 🚨 Scope Explosion Violation
🚨 Intent ViolationWhat Bitcoin Did: Fixed specific issue where
🚨 File Operation Mismatch
🚨 CI Status: PASSING (Misleading)
🚨 Auto-Reject Conditions Met
Required Action: COMPLETE REWRITEThis PR represents a fundamental misunderstanding of Bitcoin commit
Status: REJECTED - This is a bulk backport PR incorrectly labeled as bitcoin#29055 🚫 This PR has been automatically closed due to catastrophic validation failures. Please create a new PR with only the LoadWallet() fix from bitcoin#29055. |
|
Automatically closed due to catastrophic validation failures. Please see the detailed analysis above and create a new PR with a proper backport implementation. |
Backports bitcoin#29055
Original commit: 60f6773
Backported from Bitcoin Core v0.27
Summary by CodeRabbit