Remove RPU; replace with RPC

This commit is contained in:
Tyera Eulberg
2018-11-05 10:50:58 -07:00
committed by Tyera Eulberg
parent 52491b467a
commit f683817b48
18 changed files with 245 additions and 666 deletions

View File

@ -429,14 +429,17 @@ pub fn make_consecutive_blobs(
#[cfg(test)]
mod tests {
use hash::Hash;
use packet::{
to_packets, Blob, Meta, Packet, Packets, SharedBlob, SharedPackets, NUM_PACKETS,
PACKET_DATA_SIZE,
};
use request::Request;
use signature::{Keypair, KeypairUtil};
use std::io;
use std::io::Write;
use std::net::UdpSocket;
use system_transaction::SystemTransaction;
use transaction::Transaction;
#[test]
pub fn packet_send_recv() {
@ -460,7 +463,9 @@ mod tests {
#[test]
fn test_to_packets() {
let tx = Request::GetTransactionCount;
let keypair = Keypair::new();
let hash = Hash::new(&[1; 32]);
let tx = Transaction::system_new(&keypair, keypair.pubkey(), 1, hash);
let rv = to_packets(&vec![tx.clone(); 1]);
assert_eq!(rv.len(), 1);
assert_eq!(rv[0].read().unwrap().packets.len(), 1);