*Optimize SPVNode config
This commit is contained in:
parent
8f74b249da
commit
6103edf4a4
|
@ -1,4 +1,3 @@
|
||||||
import { createRequire } from "module";
|
|
||||||
import { RpcMethodList } from "./index.js";
|
import { RpcMethodList } from "./index.js";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import rand from "random-key";
|
import rand from "random-key";
|
||||||
|
@ -11,9 +10,6 @@ import {
|
||||||
HSD_PORT,
|
HSD_PORT,
|
||||||
HSD_USE_EXTERNAL_NODE,
|
HSD_USE_EXTERNAL_NODE,
|
||||||
} from "../constants.js";
|
} from "../constants.js";
|
||||||
|
|
||||||
const require = createRequire(import.meta.url);
|
|
||||||
|
|
||||||
const { NodeClient } = require("hs-client");
|
const { NodeClient } = require("hs-client");
|
||||||
|
|
||||||
let hsdServer: SPVNode;
|
let hsdServer: SPVNode;
|
||||||
|
@ -34,14 +30,14 @@ if (!HSD_USE_EXTERNAL_NODE) {
|
||||||
config: false,
|
config: false,
|
||||||
argv: false,
|
argv: false,
|
||||||
env: true,
|
env: true,
|
||||||
|
noDns: true,
|
||||||
|
httpHost: "127.0.0.1",
|
||||||
|
apiKey: clientArgs.apiKey,
|
||||||
logFile: false,
|
logFile: false,
|
||||||
logConsole: false,
|
logConsole: false,
|
||||||
logLevel: "info",
|
logLevel: "info",
|
||||||
memory: false,
|
|
||||||
workers: true,
|
workers: true,
|
||||||
listen: false,
|
|
||||||
network: "main",
|
network: "main",
|
||||||
loader: require,
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
clientArgs = {
|
clientArgs = {
|
||||||
|
|
Loading…
Reference in New Issue