fix typo foudationWalletAddr for testnet#245
fix typo foudationWalletAddr for testnet#245gzliudan wants to merge 1 commit intoXinFinOrg:masterfrom
Conversation
📝 WalkthroughWalkthroughA typo in the testnet genesis configuration file is corrected by renaming the misspelled field "foudationWalletAddr" to "foundationWalletAddr", with no functional or value changes accompanying the field name correction. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@testnet/genesis.json`:
- Line 16: The devnet and mainnet genesis JSON files still use the misspelled
key "foudationWalletAddr"; update those files so the key is spelled
"foundationWalletAddr" (exactly matching the corrected key in testnet) while
keeping the associated wallet address value unchanged, and search the repository
for any other occurrences of "foudationWalletAddr" to replace with
"foundationWalletAddr" to ensure consistency.
| "rewardCheckpoint": 900, | ||
| "gap": 450, | ||
| "foudationWalletAddr": "xdc746249c61f5832c5eed53172776b460491bdcd5c" | ||
| "foundationWalletAddr": "xdc746249c61f5832c5eed53172776b460491bdcd5c" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for references to both field name variants and related code
echo "=== Searching for 'foundationWalletAddr' (correct spelling) ==="
rg -n 'foundationWalletAddr' --max-count=20
echo ""
echo "=== Searching for 'foudationWalletAddr' (misspelled version) ==="
rg -n 'foudationWalletAddr' --max-count=20
echo ""
echo "=== Searching for 'foundation' in genesis-related code ==="
rg -n 'foundation' -i --type go --type json -B2 -A2 | head -50
echo ""
echo "=== Finding all genesis JSON files ==="
find . -name 'genesis.json' -type f 2>/dev/nullRepository: XinFinOrg/XinFin-Node
Length of output: 914
🏁 Script executed:
#!/bin/bash
# Search for Go struct definitions that map genesis JSON fields
echo "=== Searching for Genesis struct definitions ==="
rg -n 'type.*Genesis' --type go -A 30 | head -100
echo ""
echo "=== Searching for JSON struct tags related to genesis ==="
rg -n 'json:".*Wallet' --type go -B2 -A2
echo ""
echo "=== Searching for any code that reads/parses genesis files ==="
rg -n 'genesis\.json' --type go -B2 -A2
echo ""
echo "=== Check Go files in root and common directories ==="
find . -maxdepth 3 -name '*.go' -type f | head -20Repository: XinFinOrg/XinFin-Node
Length of output: 755
🏁 Script executed:
#!/bin/bash
# Understand repository structure
echo "=== Repository structure ==="
ls -la | head -20
echo ""
echo "=== File types in repository ==="
find . -type f -name '*.go' -o -name '*.js' -o -name '*.sol' -o -name '*.py' -o -name '*.java' 2>/dev/null | head -20
echo ""
echo "=== Check if there are any subdirectories that might contain code ==="
ls -d */ 2>/dev/null | head -20
echo ""
echo "=== Total files in repository ==="
git ls-files | wc -l
echo ""
echo "=== List all files to understand the repo ==="
git ls-files | head -50Repository: XinFinOrg/XinFin-Node
Length of output: 2334
🏁 Script executed:
#!/bin/bash
# Check if the address creator code references foundationWalletAddr or genesis fields
echo "=== Checking address-creator.js for references ==="
cat -n address-creator/address-creator.js | grep -i 'foundation\|wallet\|genesis' || echo "No matches found"
echo ""
echo "=== Full address-creator.js content ==="
cat -n address-creator/address-creator.jsRepository: XinFinOrg/XinFin-Node
Length of output: 1636
Fix the typo in devnet and mainnet genesis files as well.
The spelling correction is correct, but the fix is incomplete. The misspelled field foudationWalletAddr remains in both devnet/genesis.json:16 and mainnet/genesis.json:16. Apply the same correction to all three genesis files for consistency:
testnet/genesis.json:16✓ (corrected)devnet/genesis.json:16(needs fix:foudationWalletAddr→foundationWalletAddr)mainnet/genesis.json:16(needs fix:foudationWalletAddr→foundationWalletAddr)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@testnet/genesis.json` at line 16, The devnet and mainnet genesis JSON files
still use the misspelled key "foudationWalletAddr"; update those files so the
key is spelled "foundationWalletAddr" (exactly matching the corrected key in
testnet) while keeping the associated wallet address value unchanged, and search
the repository for any other occurrences of "foudationWalletAddr" to replace
with "foundationWalletAddr" to ensure consistency.
Summary by CodeRabbit
Bug Fixes
Style
Ref: XinFinOrg/XDPoSChain#2063