Skip to content

Commit 9a9d9e6

Browse files
sirdeggenclaude
andcommitted
change(wallet-infra): default network to mainnet, not mock/test
BSV_NETWORK now defaults to 'main' in the source (was 'test'), the wallet-infra compose (was 'mock'), and the unified local stack (was 'mock'). Invalid values fall back to 'main'. overlay (NETWORK) and chaintracks (CHAIN) already defaulted to main. Verified: wallet-infra boots on main without crashing (StorageServer started, network=main, 0 restarts) and emits real mainnet HTTP client spans. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WUJEwF8cQKb7MeAWhu19sk
1 parent 07d3705 commit 9a9d9e6

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

infra/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ services:
110110
<<: *otel-env
111111
OTEL_SERVICE_NAME: wallet-infra
112112
NODE_ENV: development
113-
BSV_NETWORK: mock
113+
BSV_NETWORK: main
114114
ENABLE_NGINX: "false"
115115
HTTP_PORT: "8080"
116116
SERVER_PRIVATE_KEY: bffe0d7a3f7effce2b3511323c6cca1df1649e41a336a8b603194d53287ad285

infra/wallet-infra/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ services:
1414
# e.g. add a named volume for node_modules or rely on "npm install" inside container.
1515
environment:
1616
NODE_ENV: development
17-
BSV_NETWORK: "mock"
17+
BSV_NETWORK: "main"
1818
FEE_MODEL: "{\"model\":\"sat/kb\",\"value\":100}"
1919
COMMISSION_FEE: 0
2020
HTTP_PORT: "8080"

infra/wallet-infra/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const tracer = trace.getTracer(packageJson.name, packageJson.version)
2525

2626
// Load environment variables
2727
const {
28-
BSV_NETWORK = 'test',
28+
BSV_NETWORK = 'main',
2929
ENABLE_NGINX = 'true',
3030
HTTP_PORT = 8081, // Must be 8081 if ENABLE_NGINX 'true',
3131
SERVER_PRIVATE_KEY,
@@ -88,18 +88,18 @@ async function setupWalletStorageAndMonitor(): Promise<{
8888
}
8989
const knex = makeKnex(knexConfig)
9090

91-
// Select chain from BSV_NETWORK: "main", "test", "teratest", or "mock" (defaults to "test")
91+
// Select chain from BSV_NETWORK: "main", "test", "teratest", or "mock" (defaults to "main")
9292
const allowedChains = ['main', 'test', 'teratest', 'mock'] as const
93-
let chain: (typeof allowedChains)[number] = 'test'
93+
let chain: (typeof allowedChains)[number] = 'main'
9494
if (
9595
typeof BSV_NETWORK === 'string' &&
9696
allowedChains.includes(BSV_NETWORK as any)
9797
) {
9898
chain = BSV_NETWORK as (typeof allowedChains)[number]
99-
} else if (BSV_NETWORK !== 'test') {
99+
} else if (BSV_NETWORK !== 'main') {
100100
log.warn(
101-
{ operation: 'chain.select', bsv_network: BSV_NETWORK, fallback_chain: 'test' },
102-
'Invalid BSV_NETWORK value provided, falling back to test'
101+
{ operation: 'chain.select', bsv_network: BSV_NETWORK, fallback_chain: 'main' },
102+
'Invalid BSV_NETWORK value provided, falling back to main'
103103
)
104104
}
105105

0 commit comments

Comments
 (0)