set destination address when for ledger window repair responses

This commit is contained in:
Rob Walker
2018-08-07 23:22:45 -07:00
parent a200cedb4b
commit c64e2acf8b
3 changed files with 12 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ use packet::{BlobRecycler, SharedBlob, BLOB_DATA_SIZE};
use rayon::prelude::*;
use signature::PublicKey;
use std::io::Cursor;
use std::net::SocketAddr;
use transaction::Transaction;
/// Each Entry contains three pieces of data. The `num_hashes` field is the number
@@ -83,6 +84,7 @@ impl Entry {
blob_recycler: &BlobRecycler,
idx: Option<u64>,
id: Option<PublicKey>,
addr: Option<&SocketAddr>,
) -> SharedBlob {
let blob = blob_recycler.allocate();
{
@@ -100,6 +102,9 @@ impl Entry {
if let Some(id) = id {
blob_w.set_id(id).expect("set_id()");
}
if let Some(addr) = addr {
blob_w.meta.set_addr(addr);
}
}
blob
}