mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-07-24 07:00:47 -04:00
fix slow first message
This commit is contained in:
parent
6c4b803091
commit
b0d4e35c6f
9 changed files with 141 additions and 5 deletions
|
@ -71,6 +71,12 @@ class _DHTLogSpine {
|
|||
|
||||
// Write new spine head record to the network
|
||||
await spine.operate((spine) async {
|
||||
// Write first empty subkey
|
||||
final subkeyData = _makeEmptySubkey();
|
||||
final existingSubkeyData =
|
||||
await spineRecord.tryWriteBytes(subkeyData, subkey: 1);
|
||||
assert(existingSubkeyData == null, 'Should never conflict on create');
|
||||
|
||||
final success = await spine.writeSpineHead();
|
||||
assert(success, 'false return should never happen on create');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue