De-pub
This commit is contained in:
parent
44013855d8
commit
4714dc3a5c
Binary file not shown.
|
@ -139,7 +139,7 @@ impl ContactInfo {
|
||||||
nxt_addr.set_port(addr.port() + nxt);
|
nxt_addr.set_port(addr.port() + nxt);
|
||||||
nxt_addr
|
nxt_addr
|
||||||
}
|
}
|
||||||
pub fn new_with_pubkey_socketaddr(pubkey: Pubkey, bind_addr: &SocketAddr) -> Self {
|
fn new_with_pubkey_socketaddr(pubkey: Pubkey, bind_addr: &SocketAddr) -> Self {
|
||||||
let tpu_addr = *bind_addr;
|
let tpu_addr = *bind_addr;
|
||||||
let gossip_addr = Self::next_port(&bind_addr, 1);
|
let gossip_addr = Self::next_port(&bind_addr, 1);
|
||||||
let tvu_addr = Self::next_port(&bind_addr, 2);
|
let tvu_addr = Self::next_port(&bind_addr, 2);
|
||||||
|
|
|
@ -67,12 +67,12 @@ fn get_matrix(m: i32, k: i32, w: i32) -> Vec<i32> {
|
||||||
matrix
|
matrix
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const ERASURE_W: i32 = 32;
|
const ERASURE_W: i32 = 32;
|
||||||
|
|
||||||
// Generate coding blocks into coding
|
// Generate coding blocks into coding
|
||||||
// There are some alignment restrictions, blocks should be aligned by 16 bytes
|
// There are some alignment restrictions, blocks should be aligned by 16 bytes
|
||||||
// which means their size should be >= 16 bytes
|
// which means their size should be >= 16 bytes
|
||||||
pub fn generate_coding_blocks(coding: &mut [&mut [u8]], data: &[&[u8]]) -> Result<()> {
|
fn generate_coding_blocks(coding: &mut [&mut [u8]], data: &[&[u8]]) -> Result<()> {
|
||||||
if data.is_empty() {
|
if data.is_empty() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
@ -123,11 +123,7 @@ pub fn generate_coding_blocks(coding: &mut [&mut [u8]], data: &[&[u8]]) -> Resul
|
||||||
// data: array of blocks to recover into
|
// data: array of blocks to recover into
|
||||||
// coding: arry of coding blocks
|
// coding: arry of coding blocks
|
||||||
// erasures: list of indices in data where blocks should be recovered
|
// erasures: list of indices in data where blocks should be recovered
|
||||||
pub fn decode_blocks(
|
fn decode_blocks(data: &mut [&mut [u8]], coding: &mut [&mut [u8]], erasures: &[i32]) -> Result<()> {
|
||||||
data: &mut [&mut [u8]],
|
|
||||||
coding: &mut [&mut [u8]],
|
|
||||||
erasures: &[i32],
|
|
||||||
) -> Result<()> {
|
|
||||||
if data.is_empty() {
|
if data.is_empty() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue