refactor: Improve MyceliumStreamer's message handling

- Removed unnecessary test data from `deduped_mycelium_master.vsh`.
- Simplified `MyceliumStreamer.listen()` to efficiently handle
  incoming messages, removing redundant code and improving readability.
- Enhanced error handling in `MyceliumStreamer.listen()` for more robust
  operation.
This commit is contained in:
Mahmoud Emad
2025-03-03 16:58:13 +02:00
parent 5343d9bff6
commit 42b0c4d48f
2 changed files with 12 additions and 23 deletions

View File

@@ -19,15 +19,6 @@ println('Starting master node...')
// Add worker to whitelist and initialize its database
streamer.add_worker(worker_public_key)!
// Write some test data
// id := streamer.write(id: 1, value: 'Record 1')!
// println('Wrote record with ID: ${id}')
// // Verify data in master
// master_data := streamer.read(id: id)!
// master_data_str := master_data.bytestr()
// println('Master data: ${master_data_str}')
// Keep master running to handle worker connections
mut id_ := u32(1)