Skip to content

Commit e3efbdc

Browse files
committed
Fix: wrong synchronization calculation
1 parent 1094e19 commit e3efbdc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

  • android/tinySSB/app/src/main/java/nz/scuttlebutt/tremolavossbol/tssb

android/tinySSB/app/src/main/java/nz/scuttlebutt/tremolavossbol/tssb/Repo.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,21 @@ class Repo(val context: MainActivity) {
155155
break
156156
}
157157

158-
want_offs = (want_offs + i + 1) % context.tinyGoset.keys.size
159-
want_is_valid = true
158+
160159

161160

162161
if(lst.size > 1) {
163162
var vec = lst.slice(1 .. lst.lastIndex) // want_vector without offset
164163
vec = vec.mapIndexed { index, i ->
165164
val new_idx =(index + want_offs) % vec.size
166165
lst.slice(1 .. lst.lastIndex)[new_idx]}
167-
168166
context.tinyNode.update_progress(vec, "me")
169167

170168
return Bipf.encode(Bipf.mkList(lst))
171169
}
170+
171+
want_offs = (want_offs + i + 1) % context.tinyGoset.keys.size
172+
want_is_valid = true
172173
return null
173174
}
174175

0 commit comments

Comments
 (0)