nx_torrent_seedeval.nx
buildroot/runtime/nx_torrent_seedeval.nx
about
nx_torrent_seedeval.nx -- SEEDER EVALUATION (operator: "are we too scarce, or ignoring what's out
there, or other?"). The download worker already records `download.avail` = per-piece count of the
CONNECTED peers that advertised each piece (built from their BITFIELD/HAVE). That IS the seeder data.
This tool reads it (+ download.done = what we have, + download.npc = piece count) for a torrent and
reports the swarm shape + a verdict:
- SCARCE : the missing pieces have NO holder among the peers we reached -> need wider discovery /
a web-seed (no complete seed in the reachable swarm; the usual "stuck at the last piece").
- IGNORING: the missing pieces DO have holders (av>0) yet we never completed them -> a connection /
unchoke / picker issue, NOT scarcity (we are reaching seeders but not pulling from them).
Read-only. argv[1] = the torrent's outdir (e.g. /volume1/ai/torrent/gallery/<id>).
license_tier: ORIGINAL layer: diagnostics module: nishi-core.torrent.seedeval
depends: nishi-core.syscalls, nishi-core.avail_map
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_avail_map.nxnx_bencode.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const K_MAGIC_1024: i64 = 1024 |
| 17 | const K_MAGIC_4096: i64 = 4096 |
| 18 | const K_MAGIC_4095: i64 = 4095 |
| 19 | const K_MAGIC_262144: i64 = 262144 |
| 20 | const K_MAGIC_65536: i64 = 65536 |
functions
| 22 | func se_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 23 | func se_putn(v: i64) -> i64 |
| 30 | func se_join(dir: *u8, suf: *u8, out: *u8) -> *u8 called by 1: main |
| 33 | func se_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 40 | func main(argc: i64, argv: *i64) -> i64 |