Skip to content

Conversation

TheCharlatan
Copy link
Contributor

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).

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-
@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 13, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK MarcoFalke, kevkevinpal, ryanofsky, achow101
Concept ACK hebasto

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@DrahtBot DrahtBot changed the title refactor(test): Use datadir from options in chainstatemanager test test: (refactor) Use datadir from options in chainstatemanager test Jun 13, 2023
@DrahtBot DrahtBot added the Tests label Jun 13, 2023
Copy link
Member

@maflcko maflcko left a 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,
Copy link
Member

@maflcko maflcko Jun 13, 2023

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

@hebasto
Copy link
Member

hebasto commented Jun 13, 2023

Concept ACK.

Copy link
Contributor

@kevkevinpal kevkevinpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d54819d

Copy link
Contributor

@ryanofsky ryanofsky left a 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

@achow101
Copy link
Member

ACK d54819d

@achow101 achow101 merged commit 427853a into bitcoin:master Jun 13, 2023
@bitcoin bitcoin deleted a comment Jun 14, 2023
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 15, 2023
…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
@bitcoin bitcoin locked and limited conversation to collaborators Jun 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants