mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Add backward-compatible XDPoSConfig JSON decoding for the legacy key "foudationWalletAddr" introduced before PR #2063 renamed it to "foundationWalletAddr". Without this compatibility layer, old on-disk chain configs are decoded with a zero FoundationWalletAddr, causing XDPoSConfigEqual mismatch and startup rewind ("mismatching XDPoS not equal in database"). This patch: - Implements custom UnmarshalJSON for XDPoSConfig that reads both keys. - Prefers foundationWalletAddr when both keys are present. - Keeps existing behavior for all other fields. - Adds regression tests for legacy-key decoding and precedence. Validation: - go test ./params/... |
||
|---|---|---|
| .. | ||
| bootnodes.go | ||
| config.go | ||
| config_test.go | ||
| dao.go | ||
| denomination.go | ||
| gas_table.go | ||
| network_params.go | ||
| protocol_params.go | ||