Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
ekrembal committed Dec 8, 2023
1 parent df9c9eb commit 80e776d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ use bitcoin::XOnlyPublicKey;
use bitvm::{
circuit::Circuit,
communication::{receive_message, send_message},
traits::circuit::CircuitTrait, wire::HashTuple,
traits::circuit::CircuitTrait,
wire::HashTuple,
};

use tokio_tungstenite::connect_async;


#[tokio::main]
async fn main() {
let url = "ws://127.0.0.1:9000";
Expand Down
12 changes: 8 additions & 4 deletions src/wire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ pub struct PreimageTuple {
pub one: [u8; 32],
}



#[derive(Clone)]
pub struct Wire {
pub preimages: Option<PreimageTuple>,
Expand Down Expand Up @@ -56,8 +54,14 @@ impl Wire {
let hash2 = sha256::Hash::hash(&preimage2).to_byte_array();

Wire {
preimages: Some(PreimageTuple { zero: preimage1, one: preimage2 }),
hashes: HashTuple { zero: hash1, one: hash2 },
preimages: Some(PreimageTuple {
zero: preimage1,
one: preimage2,
}),
hashes: HashTuple {
zero: hash1,
one: hash2,
},
selector: None,
index: Some(index),
}
Expand Down

0 comments on commit 80e776d

Please sign in to comment.