@@ -20,35 +20,42 @@ When fixing build errors after v26.2 merge:
2020
2121** IMPORTANT:** The ` bitcoin-v26.2-for-digibyte ` folder contains Bitcoin v26.2 code that has already been converted to DigiByte naming conventions. Always reference this folder for v26.2 code patterns.
2222
23- ### Build Process
23+ ## Build Process
24+
2425``` bash
2526# Bootstrap
2627./autogen.sh
27- ./configure
28+
29+ # START WITH MINIMAL BUILD (no GUI, no tests)
30+ ./configure --without-gui --disable-tests --disable-bench
2831
2932# Capture errors
3033make -j$( nproc) 2>&1 | tee build_errors.log
34+
35+ # Once minimal build works, add components:
36+ # Step 2: ./configure --with-gui=no --enable-tests
37+ # Step 3: ./configure --with-gui=qt5 --enable-tests --enable-bench
3138```
3239
33- ### Fix Process (ONE ERROR AT A TIME)
40+ ## Fix Process (ONE ERROR AT A TIME)
3441
35- #### 1. Identify Error
42+ ### 1. Identify Error
3643``` bash
3744grep -A5 " error:" build_errors.log | head -20
3845```
3946
40- #### 2. Compare Three Versions
47+ ### 2. Compare Three Versions
4148``` bash
4249# Set error file
4350export ERROR_FILE=" src/path/to/error.cpp"
4451
4552# Visual diff (bitcoin-v26.2-for-digibyte folder contains v26.2 code)
46- vimdiff digibyte/$ERROR_FILE \
53+ vimdiff digibyte-v8.26 /$ERROR_FILE \
4754 digibyte-v8.22.2/$ERROR_FILE \
4855 bitcoin-v26.2-for-digibyte/$ERROR_FILE
4956```
5057
51- #### 3. Fix Using v26.2 Standards
58+ ### 3. Fix Using v26.2 Standards
5259** Rule: Use Bitcoin v26.2 code as base, adapt DigiByte features to it**
5360
5461``` cpp
@@ -61,8 +68,11 @@ std::unique_ptr<CBlockTemplate> CreateNewBlock(
6168 int algo = ALGO_SHA256D); // Modern optional parameter
6269```
6370
64- #### 4. Verify & Commit
71+ ### 4. Verify & Commit
6572```bash
73+ # Clean previous build artifacts
74+ make clean
75+
6676# Test fix
6777make -j$(nproc) 2>&1 | tee test.log
6878
@@ -77,7 +87,7 @@ git commit -m "Fix build: $ERROR_FILE
7787# Return to step 1 for next error
7888```
7989
80- ### Common Fixes
90+ ## Common Fixes
8191
8292** Missing DigiByte function:**
8393- Find where it belongs in v26.2 structure
@@ -99,23 +109,28 @@ git commit -m "Fix build: $ERROR_FILE
99109# Quick check for DigiByte-specific code
100110grep -i " algo\|dandelion\|digishield\|odocrypt" $ERROR_FILE
101111# If empty and file exists in v26.2, safe to copy:
102- cp bitcoin-v26.2-for-digibyte/$ERROR_FILE digibyte/$ERROR_FILE
112+ cp bitcoin-v26.2-for-digibyte/$ERROR_FILE digibyte-v8.26 /$ERROR_FILE
103113```
104114
105115** Code removal:**
106116- If code was removed in Bitcoin v26.2 and is NOT DigiByte-specific, DELETE it
107117- Don't comment out - remove entirely to match v26.2 cleanliness
108118- Example: Old deprecated functions, unused utilities, legacy code
119+ ``` bash
120+ # Check if function/code exists in v26.2
121+ grep -n " function_name" bitcoin-v26.2-for-digibyte/$ERROR_FILE
122+ # If not found and not DGB-specific, delete it
123+ ```
109124
110- ### Critical Checks
125+ ## Critical Checks
111126Every fix must preserve:
112- - Multi-algorithm mining (5 algos + Odocrypt)
127+ - Multi-algo mining (5 algos + Odocrypt)
113128- 15-second blocks
114129- Dandelion++
115130- 21 billion supply
116131- Custom RPCs (getblockreward, etc.)
117132
118- ### Rollback Bad Fix
133+ ## Rollback Bad Fix
119134``` bash
120135git reset --hard HEAD~1
121136# Re-analyze and try again
0 commit comments