nx_unchoke_gate.nx
buildroot/runtime/nx_unchoke_gate.nx
about
nx_unchoke_gate.nx -- EXECUTION-level proof of the bulk unchoke-patience fix (the seedeval "IGNORING" bug:
holders exist but we never pulled). Drives the REAL worker child tg_from_peer against a seeder that stays
CHOKED for ~9s (past the old 6s bail) then unchokes. Pre-fix: the child bailed at 6s -> 0 pieces. Post-fix:
it keep-alives through the choke, catches the unchoke, downloads byte-perfect. Also exercises the untested
keep-alive path (must not corrupt the stream / hang). license_tier: ORIGINAL
depends: nx_torrent_get (tg_from_peer), nx_torrent_mkinfo (mk_build_info)
dependencies 2 imports · 0 importers
imports: nx_torrent_get.nxnx_torrent_mkinfo.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
| none |
functions
| 10 | func uc_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } called by 1: main |
| 11 | func uc_n(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(28); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } while k>0 { k=k-1; sys_write(1,(((t as i64)+k) as *u8),1) } return 0 } called by 1: main |
| 12 | func uc_mkdir(p: *u8) -> i64 { __syscall(258, AT_FDCWD, p as i64, 0x1ff, 0, 0, 0); return 0 } // mkdirat 0777 (EEXIST harmless) called by 1: main |
| 13 | func uc_unlink(p: *u8) -> i64 { __syscall(263, AT_FDCWD, p as i64, 0, 0, 0, 0); return 0 } called by 1: main |
| 14 | func uc_writef(p: *u8, b: *u8, n: i64) -> i64 { let fd: i64=sys_openat_wr(p, 0x1a4); if fd<0 { return 0-1 } sys_write(fd, b, n); sys_close(fd); return 0 } |
| 18 | func uc_serve(afd: i64, ih: *u8, spid: *u8, srcpath: *u8, plen: i64, total: i64, npc: i64, delay: i64) -> i64 called by 1: main calls 11: mse_ctx_plainmse_readnx_pw_build_handshakemse_writenx_pw_build_msgsys_set_socket_timeout+5 |
| 51 | func main() -> i64 |