@clawlabz/clawnetwork 0.1.22 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.ts CHANGED
@@ -7,7 +7,7 @@ declare function setInterval(fn: () => void, ms: number): unknown
7
7
  declare function clearInterval(id: unknown): void
8
8
  declare function fetch(url: string, init?: Record<string, unknown>): Promise<{ status: number; ok: boolean; text: () => Promise<string>; json: () => Promise<unknown> }>
9
9
 
10
- const VERSION = '0.1.22'
10
+ const VERSION = '0.1.23'
11
11
  const PLUGIN_ID = 'clawnetwork'
12
12
  const GITHUB_REPO = 'clawlabz/claw-network'
13
13
  const DEFAULT_RPC_PORT = 9710
@@ -528,10 +528,10 @@ function findAvailablePorts(rpcPort: number, p2pPort: number, api: OpenClawApi):
528
528
  rpc++
529
529
  }
530
530
 
531
- // Find available P2P port
531
+ // Find available P2P port (must also differ from RPC port)
532
532
  for (let i = 0; i < MAX_TRIES; i++) {
533
- if (!isPortInUse(p2p)) break
534
- api.logger?.info?.(`[clawnetwork] P2P port ${p2p} in use, trying ${p2p + 1}...`)
533
+ if (!isPortInUse(p2p) && p2p !== rpc) break
534
+ api.logger?.info?.(`[clawnetwork] P2P port ${p2p} in use or conflicts with RPC, trying ${p2p + 1}...`)
535
535
  p2p++
536
536
  }
537
537
 
@@ -1982,7 +1982,7 @@ function startUiServer(cfg: PluginConfig, api: OpenClawApi): string | null {
1982
1982
  fs.writeFileSync(scriptPath, fullScript)
1983
1983
 
1984
1984
  try {
1985
- const child = fork(scriptPath, [String(cfg.uiPort), String(cfg.rpcPort), LOG_PATH], {
1985
+ const child = fork(scriptPath, [String(cfg.uiPort), String(activeRpcPort ?? cfg.rpcPort), LOG_PATH], {
1986
1986
  detached: true,
1987
1987
  stdio: 'ignore',
1988
1988
  })
@@ -2,7 +2,7 @@
2
2
  "id": "clawnetwork",
3
3
  "name": "ClawNetwork Node",
4
4
  "description": "Run a ClawNetwork blockchain node inside OpenClaw. Every agent is a node.",
5
- "version": "0.1.22",
5
+ "version": "0.1.23",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawlabz/clawnetwork",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Run a ClawNetwork blockchain node inside OpenClaw. Every agent is a blockchain node.",
5
5
  "type": "module",
6
6
  "license": "MIT",