test: cover MNHF validation rejections#7319
Conversation
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR extends MNHF (Masternode Hard Fork) test coverage across both unit and functional test suites. The C++ unit tests are enhanced with a parametric payload version override in the CreateMNHFTx builder, enabling new test cases that validate version-bit boundary enforcement and invalid transaction scenarios. The Python functional tests introduce new helper methods for asserting mempool rejection and block submission failures, and add scenarios that test invalid MNEHF signatures and duplicate transaction detection. Both changes focus on validating MNHF verification logic without modifying production code. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
I reviewed the exact checked-out head fd5b45bc67632009626c59a58f2a9853e2f74454 against upstream/develop, focusing on the new MNHF unit and functional coverage and the corresponding validation paths in src/evo/mnhftx.cpp. The added tests align with the current rejection reasons for malformed payloads, invalid signatures, missing quorums, and duplicate active-chain signals, and I did not find a concrete correctness or Dash-specific integration issue in this patch.
Reviewed commit: fd5b45b
MNHF validation rejection coverage
Summary
invalid quorum validation paths.
rejection.
logic.
Validation
python3 -m py_compile test/functional/feature_mnehf.pygit diff --check upstream/develop..HEADupstream/develop: Recommendation: ship.have a built
build/src/test/test_dashbinary available.