Skip to content

Commit

Permalink
Clean up logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewDarnell committed Mar 1, 2024
1 parent 84834d5 commit 7183cdf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,14 @@ pub mod api_formatting_tests {
#[test]
fn create_identity_balance_request_entity() {
let req = QubicApiPacket::get_identity_balance("EPYWDREDNLHXOFYVGQUKPHJGOMPBSLDDGZDPKVQUMFXAIQYMZGEHPZTAAWON");
println!("{:?}", req);
assert_eq!(req.header._size[0], 40u8);
}

#[test]
fn create_entity_get_full_request_as_bytes() {
let mut req = QubicApiPacket::get_identity_balance("EPYWDREDNLHXOFYVGQUKPHJGOMPBSLDDGZDPKVQUMFXAIQYMZGEHPZTAAWON");
req.header.zero_dejavu(); //Dejavu is random 3 byte value
let bytes = req.as_bytes();
println!("{:?}", &bytes);
assert_eq!(bytes.len(), 40);
assert_eq!(bytes.as_slice(),
vec![40, 0, 0, 31, 0, 0, 0, 0, 170, 135, 62, 76, 253, 55, 228, 191, 82, 138, 42, 160, 30, 236, 239, 54, 84, 124, 153, 202, 170, 189, 27, 189, 247, 37, 58, 101, 176, 65, 119, 26]
Expand Down
2 changes: 0 additions & 2 deletions api/src/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ impl TransferTransaction {
Ok(pub_key) => pub_key,
Err(err) => panic!("{:?}", err)
};
println!("{} -> {:?}", source_identity.identity.as_str(), &pub_key_src);
let pub_key_dest = match get_public_key_from_identity(&String::from(dest)) {
Ok(pub_key) => pub_key,
Err(err) => panic!("{:?}", err)
Expand All @@ -50,7 +49,6 @@ impl TransferTransaction {
let mut sig: [u8; 64] = [0; 64];

sig = sign_raw(&sub_seed, &pub_key_src, digest.as_slice().try_into().unwrap());
println!("Signed Signature: {:?}", sig);
t._signature = sig.to_vec();
t
}
Expand Down
5 changes: 0 additions & 5 deletions crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@ pub mod qubic_identities {
}

pub fn sign_raw(subseed: &Vec<u8>, public_key: &[u8; 32], message_digest: [u8; 32]) -> [u8; 64] {

println!("Got Subseed: {:?}", subseed);
println!("Got Public Key: {:?}", public_key);
println!("Got Message Digest: {:?}", &message_digest);

let mut r_a = PointAffine::default();
let (mut k, mut h, mut temp) = ([0u8; 64], [0u8; 64], [0u8; 96]);
let mut r = [0u8; 64];
Expand Down

0 comments on commit 7183cdf

Please sign in to comment.