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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user