aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-01-11 00:08:15 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-01-11 00:08:19 -0800
commit88ac722c1d60b01a98ae7e0cb4dc644aebaf4a9d (patch)
tree0fe88e1d0e0e660a127baa89971a872d6d500dd6 /src/bin
parent6ffd1666992d54ffaec757cd2e42e1fd6052f349 (diff)
downloadgeniza-88ac722c1d60b01a98ae7e0cb4dc644aebaf4a9d.tar.gz
geniza-88ac722c1d60b01a98ae7e0cb4dc644aebaf4a9d.zip
make DatConnection drive-agnostic
DatConnection should work with an arbitrary number of mux'd registers (hypercore feeds) on a single connection, including just one. This removes the drive-centric metadata/content ("is_content") flag for an index number. Future refactor should turn this from a u8 to a u32 or more.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/geniza-net.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/geniza-net.rs b/src/bin/geniza-net.rs
index 0c82e6d..99ebdb5 100644
--- a/src/bin/geniza-net.rs
+++ b/src/bin/geniza-net.rs
@@ -75,8 +75,8 @@ fn run() -> Result<()> {
let count: u64 = subm.value_of("count").unwrap().parse().unwrap();
let key_bytes = parse_dat_address(&dat_key)?;
let mut dc = DatConnection::connect(host_port, &key_bytes, false)?;
- dc.receive_some(false, count)?;
- dc.receive_some(true, count)?;
+ dc.receive_some(0, count)?;
+ dc.receive_some(1, count)?;
println!("Done!");
}
("discovery-key", Some(subm)) => {
@@ -115,7 +115,7 @@ fn run() -> Result<()> {
let key_bytes = parse_dat_address(&dat_key)?;
let dir = Path::new(subm.value_of("dat-dir").unwrap());
let mut metadata = SleepDirRegister::create(&dir, "metadata")?;
- node_simple_clone(host_port, &key_bytes, &mut metadata, false)?;
+ node_simple_clone(host_port, &key_bytes, &mut metadata, 0)?;
// TODO: read out content key from metadata register
//let content = SleepDirRegister::create(&dir, "content")?;
//node_simple_clone(host_port, &key_bytes, &mut content, true)?;