DARKNET: Improve documentation; remove requirement that getBlockedRam and getDepth be called on a darknet server (#2472)

This commit is contained in:
Michael Ficocelli
2026-02-05 10:28:06 -05:00
committed by GitHub
parent a16706a33b
commit 0eae02adcf
8 changed files with 21 additions and 23 deletions
-2
View File
@@ -595,7 +595,6 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
(ctx) =>
(_host): number => {
const targetHost = helpers.string(ctx, "host", _host ?? ctx.workerScript.hostname);
expectRunningOnDarknetServer(ctx);
const onlineConnectionCheck = getFailureResult(ctx, targetHost);
if (!onlineConnectionCheck.success) {
return 0;
@@ -606,7 +605,6 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
(ctx) =>
(_host): number => {
const targetHost = helpers.string(ctx, "host", _host ?? ctx.workerScript.hostname);
expectRunningOnDarknetServer(ctx);
const onlineConnectionCheck = getFailureResult(ctx, targetHost);
if (!onlineConnectionCheck.success) {
return -1;