use std::path::PathBuf;
use redgold_schema::{ProtoSerde, structs};
use redgold_schema::structs::InitiateMultipartyKeygenRequest;
#[ignore]
#[test]
fn debug_load_offline_shares() {
for line in std::fs::read_to_string(PathBuf::from("exportedData.csv")).unwrap().split("\n") {
if line.len() == 0 {
continue;
}
let mut parts = line.split("|");
let room_id = parts.next().unwrap();
let keygen_time = parts.next().unwrap();
let keygen_public_key = structs::PublicKey::from_hex(parts.next().unwrap()).unwrap();
let host_public_key = structs::PublicKey::from_hex(parts.next().unwrap()).unwrap();
let self_initiated = parts.next().unwrap().parse::<u8>().unwrap();
let local_share = String::from_utf8(hex::decode(parts.next().unwrap()).unwrap()).unwrap();
let initiate_keygen = InitiateMultipartyKeygenRequest::proto_deserialize(hex::decode(parts.next().unwrap()).unwrap()).unwrap();
println!("{} {} {} {} {} {} {:?}", room_id, keygen_time, keygen_public_key, host_public_key, self_initiated, local_share, initiate_keygen);
}
}