nx_ts_partial_gate.nx
buildroot/runtime/nx_ts_partial_gate.nx
about
nx_ts_partial_gate.nx -- proves PARTIAL-BITFIELD seeding: ts_load_have reads download.done (sibling of the
srcpath download.part) and ts_build_bitfield_have advertises ONLY the pieces we hold. Setup: npc=3, have
map [1,0,1] (hold pieces 0 & 2, NOT 1). Expect load_have=1, have=[1,0,1], bitfield byte = 0xA0 (bits 7 & 5
set, bit 6 clear = MSB-first pieces 0 & 2). This is what makes a selective/complete-on-wanted torrent seed
honestly (never advertises/serves the junk pieces it skipped). license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_torrent_seed.nxnx_gate_verdict.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
| 9 | func pg_p(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 |
| 10 | func pg_n(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; 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 main() -> i64 |