Browse Source

Emergency fix.

master
Thomas Kerber 2 years ago
parent
commit
1e594b1f15
1 changed files with 11 additions and 3 deletions
  1. 11
    3
      ethvc/src/lib.rs

+ 11
- 3
ethvc/src/lib.rs View File

@@ -22,10 +22,18 @@ pub fn init_proofs() {
}

pub fn finalise_proofs() -> Vec<u8> {
// TODO: currently proofs don't work with output, or are concatinated.
let _ = consume_proofs();
let proofs = consume_proofs();
PROVING.write().map(|mut p| *p = false).ok();
vec![42]
let mut ret = Vec::new();
for mut proof in proofs.into_iter() {
ret.extend(&[0u8; 28]);
ret.push(((proof.len() >> 24) & 0xff) as u8);
ret.push(((proof.len() >> 16) & 0xff) as u8);
ret.push(((proof.len() >> 8) & 0xff) as u8);
ret.push(((proof.len() >> 0) & 0xff) as u8);
ret.append(&mut proof);
}
ret
}

pub fn call(input: &[u8]) -> Vec<u8> {

Loading…
Cancel
Save