Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
e1b3be04
Commit
e1b3be04
authored
Feb 23, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify code of PartitionTable.addNode
parent
85600dbd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
neo/master/pt.py
neo/master/pt.py
+7
-12
No files found.
neo/master/pt.py
View file @
e1b3be04
...
...
@@ -163,10 +163,8 @@ class PartitionTable(PartitionTable):
max_count
=
0
max_cell
=
None
num_cells
=
0
skip
=
False
for
cell
in
row
:
if
cell
.
getNode
()
==
node
:
skip
=
True
if
cell
.
getNode
()
is
node
:
break
if
cell
.
isFeeding
():
feeding_cell
=
cell
...
...
@@ -177,16 +175,13 @@ class PartitionTable(PartitionTable):
max_count
=
count
max_cell
=
cell
if
skip
:
continue
else
:
if
num_cells
<=
self
.
nr
:
row
.
append
(
neo
.
lib
.
pt
.
Cell
(
node
,
CellStates
.
OUT_OF_DATE
))
cell_list
.
append
((
offset
,
node
.
getUUID
(),
CellStates
.
OUT_OF_DATE
))
node_count
+=
1
else
:
if
max_count
-
node_count
>
1
:
elif
node_count
+
1
<
max_count
:
if
feeding_cell
is
not
None
or
max_cell
.
isOutOfDate
():
# If there is a feeding cell already or it is
# out-of-date, just drop the node.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment