mirror of
https://github.com/luxfi/genesis.git
synced 2026-07-27 04:11:41 +00:00
chore: kill fuji — no Avalanche/Fuji terminology
Per canonical rule: Lux is its own thing, fuji isn't ours. Sweep removes positive references to the Avalanche testnet name from comments, function names, test fixtures, and example data. Where defensive code rejects non-Lux HRPs (lux/genesis), the test input swapped from 'P-fuji1...' to 'P-avax1...' so the rejection behavior still proves out without naming fuji as a thing. Build clean.
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// never aliased:
|
||||
//
|
||||
// - `networkID` — identifies a validator network. Comes in two scopes:
|
||||
// * primary networkID (uint32: 1=mainnet, 2=fuji, 3=local, 1337=dev)
|
||||
// * primary networkID (uint32: 1=mainnet, 2=testnet, 3=local, 1337=dev)
|
||||
// * per-chain networkID (ids.ID 32 bytes) — the CreateNetworkTx ID
|
||||
// that owns one or more chains.
|
||||
// - `chainID` — the blockchain's own globally unique ID (ids.ID 32 bytes).
|
||||
|
||||
@@ -300,7 +300,7 @@ func GetBootstrappersFromKeys(keysDir string) ([]Bootstrapper, error) {
|
||||
}
|
||||
|
||||
// allowedHRPs is the closed set of bech32 HRPs that ParseAddress accepts.
|
||||
// Any other HRP (notably "avax"/"fuji" from upstream Avalanche or arbitrary
|
||||
// Any other HRP (notably "avax" from upstream Avalanche or arbitrary
|
||||
// user HRPs) is a wrong-network event — the same 20 bytes silently re-encoded
|
||||
// under a foreign HRP must not be admitted into a Lux genesis.
|
||||
var allowedHRPs = map[string]struct{}{
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// TestParseAddress_HRPWhitelist locks in that ParseAddress accepts only the
|
||||
// canonical Lux HRPs (lux/test/dev/local). Any other HRP — notably an upstream
|
||||
// "avax"/"fuji" address copy-pasted into a Lux genesis — must be rejected with
|
||||
// "avax" or other non-lux address copy-pasted into a Lux genesis — must be rejected with
|
||||
// a clear error rather than silently re-encoded into a lux1... allocation.
|
||||
func TestParseAddress_HRPWhitelist(t *testing.T) {
|
||||
tests := []struct {
|
||||
@@ -39,9 +39,9 @@ func TestParseAddress_HRPWhitelist(t *testing.T) {
|
||||
wantErr: `unsupported HRP "avax"`,
|
||||
},
|
||||
{
|
||||
name: "reject P-fuji (fuji HRP not allowed)",
|
||||
addr: "P-fuji1ck0t9h5u7jvvzhx29n99guqjsfkpzt67cr6m3y",
|
||||
wantErr: `unsupported HRP "fuji"`,
|
||||
name: "reject non-lux HRP",
|
||||
addr: "P-avax1ck0t9h5u7jvvzhx29n99guqjsfkpzt67cr6m3y",
|
||||
wantErr: `unsupported HRP "avax"`,
|
||||
},
|
||||
|
||||
// Reject: empty.
|
||||
|
||||
Reference in New Issue
Block a user