Update Rust debugging
This commit is contained in:
parent
c583451c83
commit
1e31bb73c2
1 changed files with 0 additions and 10 deletions
|
@ -1668,12 +1668,10 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
println!("{:?}", orch_anchor);
|
|
||||||
let build_config = BuildConfig::Standard {sapling_anchor: sap_anchor, orchard_anchor: orch_anchor};
|
let build_config = BuildConfig::Standard {sapling_anchor: sap_anchor, orchard_anchor: orch_anchor};
|
||||||
let mut main_builder = Builder::new(MainNetwork, BlockHeight::from(bl_height), build_config);
|
let mut main_builder = Builder::new(MainNetwork, BlockHeight::from(bl_height), build_config);
|
||||||
let mut test_builder = Builder::new(TestNetwork, BlockHeight::from(bl_height), build_config);
|
let mut test_builder = Builder::new(TestNetwork, BlockHeight::from(bl_height), build_config);
|
||||||
let trans_input: Vec<HtransparentInput> = marshall_from_haskell_var(t_input, t_input_len, RW);
|
let trans_input: Vec<HtransparentInput> = marshall_from_haskell_var(t_input, t_input_len, RW);
|
||||||
println!("{:?}", trans_input);
|
|
||||||
for t_in in trans_input {
|
for t_in in trans_input {
|
||||||
if t_in.sk.len() > 1 {
|
if t_in.sk.len() > 1 {
|
||||||
let k = SecretKey::from_slice(&t_in.sk).unwrap();
|
let k = SecretKey::from_slice(&t_in.sk).unwrap();
|
||||||
|
@ -1697,7 +1695,6 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let sap_input: Vec<HsaplingInput> = marshall_from_haskell_var(s_input, s_input_len, RW);
|
let sap_input: Vec<HsaplingInput> = marshall_from_haskell_var(s_input, s_input_len, RW);
|
||||||
println!("{:?}", sap_input);
|
|
||||||
for s_in in sap_input {
|
for s_in in sap_input {
|
||||||
if s_in.sk.len() > 1 {
|
if s_in.sk.len() > 1 {
|
||||||
let sp_key = ExtendedSpendingKey::from_bytes(&s_in.sk);
|
let sp_key = ExtendedSpendingKey::from_bytes(&s_in.sk);
|
||||||
|
@ -1726,7 +1723,6 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let orch_input: Vec<HorchardInput> = marshall_from_haskell_var(o_input, o_input_len, RW);
|
let orch_input: Vec<HorchardInput> = marshall_from_haskell_var(o_input, o_input_len, RW);
|
||||||
println!("{:?}", orch_input);
|
|
||||||
for o_in in orch_input {
|
for o_in in orch_input {
|
||||||
if o_in.sk.len() > 1 {
|
if o_in.sk.len() > 1 {
|
||||||
let sp_key = SpendingKey::from_bytes(o_in.sk[0..32].try_into().unwrap()).unwrap();
|
let sp_key = SpendingKey::from_bytes(o_in.sk[0..32].try_into().unwrap()).unwrap();
|
||||||
|
@ -1746,7 +1742,6 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let outputs: Vec<Houtput> = marshall_from_haskell_var(out_list, out_list_len, RW);
|
let outputs: Vec<Houtput> = marshall_from_haskell_var(out_list, out_list_len, RW);
|
||||||
println!("{:?}", outputs);
|
|
||||||
for output in outputs {
|
for output in outputs {
|
||||||
match output.kind {
|
match output.kind {
|
||||||
1 => {
|
1 => {
|
||||||
|
@ -1791,10 +1786,8 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
||||||
let memo = MemoBytes::from_bytes(&output.memo).unwrap();
|
let memo = MemoBytes::from_bytes(&output.memo).unwrap();
|
||||||
if net {
|
if net {
|
||||||
let _mb = main_builder.add_orchard_output::<String>(ovk, recipient, val, memo);
|
let _mb = main_builder.add_orchard_output::<String>(ovk, recipient, val, memo);
|
||||||
println!("added o-input to main");
|
|
||||||
} else {
|
} else {
|
||||||
let _tb = test_builder.add_orchard_output::<String>(ovk, recipient, val, memo);
|
let _tb = test_builder.add_orchard_output::<String>(ovk, recipient, val, memo);
|
||||||
println!("added o-input to test");
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
|
@ -1808,12 +1801,9 @@ pub extern "C" fn rust_wrapper_create_transaction(
|
||||||
let output_params_in: Vec<u8> = marshall_from_haskell_var(sapoutput, sapoutput_len, RW);
|
let output_params_in: Vec<u8> = marshall_from_haskell_var(sapoutput, sapoutput_len, RW);
|
||||||
let output_params_reader = Cursor::new(output_params_in);
|
let output_params_reader = Cursor::new(output_params_in);
|
||||||
let output_prover = OutputParameters::read(output_params_reader, false).unwrap();
|
let output_prover = OutputParameters::read(output_params_reader, false).unwrap();
|
||||||
println!("loaded params");
|
|
||||||
let result = if net {
|
let result = if net {
|
||||||
println!("started main build");
|
|
||||||
main_builder.build(OsRng, &spend_prover, &output_prover, &FeeRule::standard())
|
main_builder.build(OsRng, &spend_prover, &output_prover, &FeeRule::standard())
|
||||||
} else {
|
} else {
|
||||||
println!("started test build");
|
|
||||||
test_builder.build(OsRng, &spend_prover, &output_prover, &FeeRule::standard())
|
test_builder.build(OsRng, &spend_prover, &output_prover, &FeeRule::standard())
|
||||||
};
|
};
|
||||||
match result {
|
match result {
|
||||||
|
|
Loading…
Reference in a new issue