Skip to content

Commit 180af37

Browse files
committed
node update fixed
1 parent 451a72a commit 180af37

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nebula/frontend/database.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ async def initialize_databases():
7272
ip TEXT,
7373
port TEXT,
7474
role TEXT,
75-
malicious TEXT,
7675
neighbors TEXT,
7776
latitude TEXT,
7877
longitude TEXT,
7978
timestamp TEXT,
8079
federation TEXT,
8180
round TEXT,
8281
scenario TEXT,
83-
hash TEXT
82+
hash TEXT,
83+
malicious TEXT
8484
);
8585
"""
8686
)
@@ -90,7 +90,6 @@ async def initialize_databases():
9090
"ip": "TEXT",
9191
"port": "TEXT",
9292
"role": "TEXT",
93-
"malicious": "TEXT",
9493
"neighbors": "TEXT",
9594
"latitude": "TEXT",
9695
"longitude": "TEXT",
@@ -99,6 +98,7 @@ async def initialize_databases():
9998
"round": "TEXT",
10099
"scenario": "TEXT",
101100
"hash": "TEXT",
101+
"malicious": "TEXT",
102102
}
103103
await ensure_columns(conn, "nodes", desired_columns)
104104

@@ -322,15 +322,14 @@ async def update_node_record(
322322
)
323323
else:
324324
# Update the record
325-
command = "UPDATE nodes SET idx = ?, ip = ?, port = ?, role = ?, malicious = ?, neighbors = ?, latitude = ?, longitude = ?, timestamp = ?, federation = ?, round = ?, hash = ? WHERE uid = ? AND scenario = ?;"
325+
command = "UPDATE nodes SET idx = ?, ip = ?, port = ?, role = ?, neighbors = ?, latitude = ?, longitude = ?, timestamp = ?, federation = ?, round = ?, hash = ?, malicious = ? WHERE uid = ? AND scenario = ?;"
326326
await _c.execute(
327327
command,
328328
(
329329
idx,
330330
ip,
331331
port,
332332
role,
333-
malicious,
334333
neighbors,
335334
latitude,
336335
longitude,
@@ -340,6 +339,7 @@ async def update_node_record(
340339
run_hash,
341340
node_uid,
342341
scenario,
342+
malicious,
343343
),
344344
)
345345

0 commit comments

Comments
 (0)