message: Reuse vector in send
diff: @@ -46,6 +46,8 @@ namespace pbft
  message_receiver_base = receiver;
  }
  + std::vector<uint8_t> serialized_msg;
  +
  int Send(Message* msg, IPrincipal& principal) override
  {
  NodeId to = principal.pid();
  @@ -61,9 +63,12 @@ namespace pbft
  PbftHeader hdr = {PbftMsgType::pbft_message, id};
  // TODO: Encrypt msg here
  - std::vector<uint8_t> serialized_msg(sizeof(PbftHeader) + msg->size());
  + auto space = (sizeof(PbftHeader) + msg->size());
  + if (serialized_msg.size() < space)
  + {
  + serialized_msg.resize(space);
  + }
  auto data_ = serialized_msg.data();
  - auto space = serialized_msg.size();
  serialized::write<PbftHeader>(data_, space, hdr);
  serialized::write(
  data_,
  