Bind &[pubinput] in plonk test_proving()

This commit is contained in:
therealyingtong 2020-10-08 00:21:32 +08:00
parent 97873fa6ea
commit 5181ca56f1

View file

@ -408,9 +408,10 @@ fn test_proving() {
) )
.expect("proof generation should not fail"); .expect("proof generation should not fail");
let pubinput_slice = &[pubinput];
let msm = params.empty_msm(); let msm = params.empty_msm();
let guard = proof let guard = proof
.verify::<DummyHash<Fq>, DummyHash<Fp>>(&params, pk.get_vk(), msm, &[pubinput]) .verify::<DummyHash<Fq>, DummyHash<Fp>>(&params, pk.get_vk(), msm, pubinput_slice)
.unwrap(); .unwrap();
{ {
let msm = guard.clone().use_challenges(); let msm = guard.clone().use_challenges();
@ -424,7 +425,7 @@ fn test_proving() {
let msm = guard.clone().use_challenges(); let msm = guard.clone().use_challenges();
assert!(msm.clone().eval()); assert!(msm.clone().eval());
let guard = proof let guard = proof
.verify::<DummyHash<Fq>, DummyHash<Fp>>(&params, pk.get_vk(), msm, &[pubinput]) .verify::<DummyHash<Fq>, DummyHash<Fp>>(&params, pk.get_vk(), msm, pubinput_slice)
.unwrap(); .unwrap();
{ {
let msm = guard.clone().use_challenges(); let msm = guard.clone().use_challenges();