Multinode fixes and test
* Replace magic numbers for 64k event size * Fix gossip, dont ping yourself * Retransmit only to listening nodes * Multinode test in stub marked unstable
This commit is contained in:
committed by
Anatoly Yakovenko
parent
6af27669b0
commit
e8f5fb35ac
@@ -76,6 +76,8 @@ fn main() {
|
||||
})
|
||||
});
|
||||
|
||||
eprintln!("done parsing...");
|
||||
|
||||
// The first item in the ledger is required to be an entry with zero num_hashes,
|
||||
// which implies its id can be used as the ledger's seed.
|
||||
let entry0 = entries.next().unwrap();
|
||||
@@ -90,10 +92,14 @@ fn main() {
|
||||
None
|
||||
};
|
||||
|
||||
eprintln!("creating accountant...");
|
||||
|
||||
let acc = Accountant::new_from_deposit(&deposit.unwrap());
|
||||
acc.register_entry_id(&entry0.id);
|
||||
acc.register_entry_id(&entry1.id);
|
||||
|
||||
eprintln!("processing entries...");
|
||||
|
||||
let mut last_id = entry1.id;
|
||||
for entry in entries {
|
||||
last_id = entry.id;
|
||||
@@ -101,6 +107,8 @@ fn main() {
|
||||
acc.register_entry_id(&last_id);
|
||||
}
|
||||
|
||||
eprintln!("creating networking stack...");
|
||||
|
||||
let (input, event_receiver) = sync_channel(10_000);
|
||||
let historian = Historian::new(event_receiver, &last_id, Some(1000));
|
||||
let exit = Arc::new(AtomicBool::new(false));
|
||||
@@ -115,6 +123,7 @@ fn main() {
|
||||
replicate_sock.local_addr().unwrap(),
|
||||
serve_sock.local_addr().unwrap(),
|
||||
);
|
||||
eprintln!("starting server...");
|
||||
let threads =
|
||||
AccountantSkel::serve(&skel, d, serve_sock, gossip_sock, exit.clone(), stdout()).unwrap();
|
||||
eprintln!("Ready. Listening on {}", serve_addr);
|
||||
|
Reference in New Issue
Block a user