Update heartwood and schemas

This commit is contained in:
Sebastian Martinez
2024-01-19 12:10:37 +01:00
parent bd4e56956e
commit f18b91d669
6 changed files with 10 additions and 8 deletions
+4 -1
View File
@@ -76,6 +76,7 @@ export type Node = z.infer<typeof nodeSchema>;
const nodeSchema = object({
id: string(),
version: string(),
config: object({
alias: string(),
peers: union([
@@ -91,6 +92,8 @@ const nodeSchema = object({
routingMaxSize: number(),
routingMaxAge: number(),
fetchConcurrency: number(),
gossipMaxAge: number(),
maxOpenFiles: number(),
rate: object({
inbound: object({
fillRate: number(),
@@ -114,7 +117,7 @@ const nodeInfoSchema = object({
message: string(),
service: string(),
version: string(),
node: nodeSchema.pick({ id: true }),
nid: string(),
path: string(),
links: array(
object({
-1
View File
@@ -11,7 +11,6 @@ export async function authenticate(
"http://localhost:3001",
"--no-open",
"--connect",
"--listen",
`${peer.httpdBaseUrl.hostname}:${peer.httpdBaseUrl.port}`,
]);
const match = stdout.match(/Visit (http:\/\/\S+) to connect/);
+3 -4
View File
@@ -94,8 +94,7 @@ export async function loadNodeRoute(
const api = new HttpdClient(params.baseUrl);
try {
const projectPageIndex = 0;
const [nodeInfo, node, { projects, total }] = await Promise.all([
api.getNodeInfo(),
const [node, { projects, total }] = await Promise.all([
api.getNode(),
loadProjects(projectPageIndex, params.baseUrl),
]);
@@ -104,9 +103,9 @@ export async function loadNodeRoute(
params: {
projectPageIndex: projectPageIndex + 1,
baseUrl: params.baseUrl,
nid: nodeInfo.node.id,
nid: node.id,
externalAddresses: node.config?.externalAddresses ?? [],
version: nodeInfo.version,
version: node.version,
projects: projects,
projectCount: total,
},
-1
View File
@@ -152,7 +152,6 @@ export const test = base.extend<{
"http://localhost:3001",
"--no-open",
"--connect",
"--listen",
`${peer.httpdBaseUrl.hostname}:${peer.httpdBaseUrl.port}`,
]);
const match = stdout.match(/Visit (http:\/\/\S+) to connect/);
+1 -1
View File
@@ -1 +1 @@
6bc7d297a5e7e3feecec3f61327a9adbdf532f61
5dbd9bb2a32dca6aafbd2b4a50dd73d237ca025d
+2
View File
@@ -136,6 +136,7 @@ export const NodeConfigSchema = object({
routingMaxAge: number(),
fetchConcurrency: number(),
gossipMaxAge: number(),
maxOpenFiles: number(),
rate: object({
inbound: object({ fillRate: number(), capacity: number() }),
outbound: object({ fillRate: number(), capacity: number() }),
@@ -307,6 +308,7 @@ export class RadiclePeer {
routingMaxAge: 604800,
fetchConcurrency: 1,
gossipMaxAge: 1209600,
maxOpenFiles: 4096,
rate: {
inbound: { fillRate: 0.2, capacity: 32 },
outbound: { fillRate: 1.0, capacity: 64 },