-
Notifications
You must be signed in to change notification settings - Fork 37.7k
test: (refactor) Use datadir from options in chainstatemanager test #27876
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
Conversation
This should make the test less reliant on details of the test setup -BEGIN VERIFY SCRIPT- sed -i 's/m_args.GetDataDirNet()/chainman.m_options.datadir/g' src/test/validation_chainstatemanager_tests.cpp -END VERIFY SCRIPT-
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm ACK d54819d
@@ -382,7 +382,7 @@ struct SnapshotTestSetup : TestChain100Setup { | |||
m_node.notifications = std::make_unique<KernelNotifications>(); | |||
const ChainstateManager::Options chainman_opts{ | |||
.chainparams = ::Params(), | |||
.datadir = m_args.GetDataDirNet(), | |||
.datadir = chainman.m_options.datadir, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review note, this creates a copy and is not a reference, thus memory-safe
Concept ACK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK d54819d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK d54819d
ACK d54819d |
…instatemanager test d54819d scripted-diff: Use datadir from options in chainstatemanager test (TheCharlatan) Pull request description: This should make the test less reliant on argument state from the test setup. This is a follow-up PR as requested in bitcoin#27576 (comment). ACKs for top commit: achow101: ACK d54819d MarcoFalke: lgtm ACK d54819d kevkevinpal: ACK bitcoin@d54819d ryanofsky: Code review ACK d54819d Tree-SHA512: 939fde2505c5585d993545a3d05d3a00caec40f860c74fa002caebdf4c1b70e774cfb028a8a8f780525f8968844157d2c568d9f2c8dd5ec32b093173d8644c34
This should make the test less reliant on argument state from the test setup. This is a follow-up PR as requested in #27576 (comment).