mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -05:00
net/message: Allow packet payloads to be empty.
We should be able to send commands without a payload.
This commit is contained in:
@@ -135,7 +135,7 @@ pub async fn send_packet<W: AsyncWrite + Unpin + Send + Sized>(
|
||||
packet: Packet,
|
||||
) -> Result<usize> {
|
||||
assert!(!packet.command.is_empty());
|
||||
assert!(!packet.payload.is_empty());
|
||||
//assert!(!packet.payload.is_empty());
|
||||
assert!(std::mem::size_of::<usize>() <= std::mem::size_of::<u64>());
|
||||
|
||||
let mut written: usize = 0;
|
||||
|
||||
Reference in New Issue
Block a user