Save chunks in db
One of the changes introduced for this is that multiple chunks and diffs are now represented by dicts, not lists.
This commit is contained in:
parent
9e5b5f874a
commit
aca387cf05
4 changed files with 121 additions and 70 deletions
|
|
@ -31,7 +31,7 @@ class ClientChunkPool(ChunkPool):
|
|||
def save_changes(self):
|
||||
diffs = self.commit_changes()
|
||||
# filter out empty changes/chunks
|
||||
diffs = [dchunk for dchunk in diffs if not dchunk[1].empty()]
|
||||
diffs = {pos: diff for pos, diff in diffs.items() if not diff.empty()}
|
||||
|
||||
if diffs:
|
||||
self._client.send_changes(diffs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue