-
Notifications
You must be signed in to change notification settings - Fork 1.2k
backport: Merge bitcoin#31718, 28857, 28825, 29361, 26533, 27302, 29034 #7376
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: develop
Are you sure you want to change the base?
Changes from all commits
f64a0ff
7e02b92
31a75df
733e48d
76064a0
e1021fd
dfb3098
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Configuration | ||
| --- | ||
|
|
||
| - `bitcoind` and `bitcoin-qt` will now raise an error on startup if a datadir that is being used contains a bitcoin.conf file that will be ignored, which can happen when a datadir= line is used in a bitcoin.conf file. The error message is just a diagnostic intended to prevent accidental misconfiguration, and it can be disabled to restore the previous behavior of using the datadir while ignoring the bitcoin.conf contained in it. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,9 +19,9 @@ | |
| #include <policy/policy.h> | ||
| #include <pow.h> | ||
| #include <primitives/transaction.h> | ||
| #include <timedata.h> | ||
| #include <util/moneystr.h> | ||
| #include <util/system.h> | ||
| #include <util/time.h> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Check for orphaned timedata symbols in miner.cpp after include swap
# Search for timedata usage in miner.cpp
echo "=== Checking for timedata symbol usage in miner.cpp ==="
rg -n 'timedata|dNtpOffset' src/node/miner.cpp || echo "No timedata symbol references found"
# Verify util/time.h exports needed symbols
echo ""
echo "=== Checking util/time.h for time symbols ==="
grep -E '(GetTime|GetAdjustedTime|dNtpOffset)' src/util/time.h || echo "Time symbols may not be in util/time.h"Repository: dashpay/dash Length of output: 282 🏁 Script executed: #!/bin/bash
# Check what time functions miner.cpp actually uses
echo "=== Time-related function calls in miner.cpp ==="
rg -n '(GetTime|GetAdjustedTime|GetSystemTimeInSeconds|dNtpOffset)' src/node/miner.cpp
# Also check for any remaining includes that might provide time functionality
echo ""
echo "=== All includes in miner.cpp ==="
head -30 src/node/miner.cpp | grep '^`#include`'Repository: dashpay/dash Length of output: 1009 🏁 Script executed: #!/bin/bash
# Find GetAdjustedTime definition
echo "=== Searching for GetAdjustedTime definition ==="
rg -n 'GetAdjustedTime' --type cpp --type h | head -20
# Check full util/time.h content to see all exports
echo ""
echo "=== Full util/time.h content ==="
cat src/util/time.hRepository: dashpay/dash Length of output: 7294 🏁 Script executed: #!/bin/bash
# Check if timedata.h is included transitively
echo "=== Checking node/miner.h for timedata.h include ==="
rg -n 'timedata' src/node/miner.h
echo ""
echo "=== Checking validation.h for timedata.h include ==="
rg -n 'timedata' src/validation.h | head -5
echo ""
echo "=== Checking chain.h for timedata.h include ==="
rg -n 'timedata' src/chain.h
echo ""
echo "=== Full search for timedata.h includes ==="
rg '`#include`.*timedata' --type h --type cpp | grep -E '(chain\.h|validation\.h|node/miner\.h|pow\.h)'Repository: dashpay/dash Length of output: 257 🏁 Script executed: #!/bin/bash
# Check what headers transitively include timedata.h
echo "=== Which headers include timedata.h ==="
rg '`#include`.*timedata\.h' --type h --type cpp
echo ""
echo "=== Does pow.h include timedata ==="
cat src/pow.h | grep -E '(timedata|GetAdjustedTime)' || echo "Not found in pow.h"
echo ""
echo "=== Verify miner.cpp would have access to GetAdjustedTime ==="
# Check if any of miner's includes transitively get timedata.h
for header in consensus/consensus.h consensus/validation.h pow.h; do
if rg '`#include`.*timedata' "src/$header" > /dev/null 2>&1; then
echo "$header includes timedata.h"
fi
done
echo "Done checking transitive includes"Repository: dashpay/dash Length of output: 1053 🏁 Script executed: #!/bin/bash
# Check if validation.h or pow.h indirectly include timedata.h
echo "=== Check validation.h includes ==="
head -50 src/validation.h | grep '`#include`'
echo ""
echo "=== Check pow.h includes ==="
head -50 src/pow.h | grep '`#include`'
echo ""
echo "=== Comprehensive check: trace includes from miner.cpp ==="
# For key headers, check if they include timedata
for header in src/validation.h src/pow.h src/consensus/consensus.h src/chainparams.h; do
if [ -f "$header" ]; then
result=$(grep '`#include`.*timedata' "$header")
if [ -n "$result" ]; then
echo "$header INCLUDES timedata.h"
fi
fi
done
echo "Check complete"Repository: dashpay/dash Length of output: 1050 Add timedata.h include or implement GetAdjustedTime() in util/time.h. The include swap removes timedata.h but miner.cpp calls 🧰 Tools🪛 Cppcheck (2.21.0)[error] 24-24: (preprocessorErrorDirective) 🤖 Prompt for AI Agents |
||
| #include <validation.h> | ||
|
|
||
| #include <chainlock/chainlock.h> | ||
|
|
||
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.
This registers
-allowignoredconf, butArgsManager::ReadConfigFiles()still has no logic to detect an ignored datadir config file or to downgrade that error when this flag is set. In the scenario added bytest_ignored_conf,-conf=<temp>points back to a datadir that already hasdash.conf, but startup will succeed and silently ignore that datadir config instead of failing or warning, so the new default functional test fails and users get a no-op safety option.Useful? React with 👍 / 👎.