diff --git a/src/crdt.rs b/src/crdt.rs index 8bbc2b28ec..09550ce7ef 100644 --- a/src/crdt.rs +++ b/src/crdt.rs @@ -1016,7 +1016,12 @@ impl Crdt { if let Ok(entry) = ledger_window.get_entry(ix) { inc_new_counter!("crdt-window-request-ledger", 1); - let out = entry.to_blob(blob_recycler, Some(ix), Some(from.id)); + let out = entry.to_blob( + blob_recycler, + Some(ix), + Some(from.id), + Some(&from.contact_info.tvu_window), + ); return Some(out); } diff --git a/src/entry.rs b/src/entry.rs index 124db01ab6..2964df03e1 100644 --- a/src/entry.rs +++ b/src/entry.rs @@ -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, id: Option, + 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 } diff --git a/src/ledger.rs b/src/ledger.rs index d48193d802..523f192c1d 100644 --- a/src/ledger.rs +++ b/src/ledger.rs @@ -399,7 +399,7 @@ impl Block for [Entry] { fn to_blobs(&self, blob_recycler: &packet::BlobRecycler, q: &mut VecDeque) { for entry in self { - let blob = entry.to_blob(blob_recycler, None, None); + let blob = entry.to_blob(blob_recycler, None, None, None); q.push_back(blob); } }