Compare commits
No commits in common. "3296909c82ce20c587c8919646d96b01cc10203e" and "7d20edd08db75894cb8d5928c7f5584cd196bcf8" have entirely different histories.
3296909c82
...
7d20edd08d
3 changed files with 9 additions and 34 deletions
|
@ -10,7 +10,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Orchard note nullifier calculation
|
- Orchard note nullifier calculation
|
||||||
- Sapling spend field parsing
|
|
||||||
|
|
||||||
## [0.5.5.2]
|
## [0.5.5.2]
|
||||||
|
|
||||||
|
|
|
@ -401,9 +401,9 @@ impl<RW> ToHaskell<RW> for HSBundle {
|
||||||
|
|
||||||
impl HSBundle {
|
impl HSBundle {
|
||||||
pub fn from_bundle(sb: &SaplingBundle<SaplingAuthorized>) -> HSBundle {
|
pub fn from_bundle(sb: &SaplingBundle<SaplingAuthorized>) -> HSBundle {
|
||||||
let mut s: Vec<u8> = Vec::new();
|
let s = Cursor::new(Vec::new());
|
||||||
sb.authorization().binding_sig.write(&mut s).unwrap();
|
sb.authorization().binding_sig.write(s.clone()).unwrap();
|
||||||
return HSBundle {empty: false, spends: Hspend::pack(sb.shielded_spends()) , outputs: HshieldedOutput::pack(sb.shielded_outputs()) , value: i64::from(sb.value_balance()) , sig: s }
|
return HSBundle {empty: false, spends: Hspend::pack(sb.shielded_spends()) , outputs: HshieldedOutput::pack(sb.shielded_outputs()) , value: i64::from(sb.value_balance()) , sig: s.into_inner() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,11 +428,11 @@ impl Hspend {
|
||||||
pub fn pack(sp: &[SpendDescription<SaplingAuthorized>]) -> Vec<Hspend> {
|
pub fn pack(sp: &[SpendDescription<SaplingAuthorized>]) -> Vec<Hspend> {
|
||||||
let mut r = Vec::new();
|
let mut r = Vec::new();
|
||||||
for s in sp {
|
for s in sp {
|
||||||
let mut rk = Vec::new();
|
let rk = Cursor::new(Vec::new());
|
||||||
let mut authsig = Vec::new();
|
let authsig = Cursor::new(Vec::new());
|
||||||
s.rk().write(&mut rk).unwrap();
|
s.rk().write(rk.clone()).unwrap();
|
||||||
s.spend_auth_sig().write(&mut authsig).unwrap();
|
s.spend_auth_sig().write(authsig.clone()).unwrap();
|
||||||
r.push(Hspend {cv: Hhex{bytes:s.cv().to_bytes().to_vec()}, anchor: Hhex{bytes:s.anchor().to_bytes().to_vec()}, nullifier: Hhex{bytes:s.nullifier().to_vec()}, rk: Hhex{bytes: rk}, proof: Hhex{bytes:s.zkproof().to_vec()}, authsig: Hhex{bytes:authsig}});
|
r.push(Hspend {cv: Hhex{bytes:s.cv().to_bytes().to_vec()}, anchor: Hhex{bytes:s.anchor().to_bytes().to_vec()}, nullifier: Hhex{bytes:s.nullifier().to_vec()}, rk: Hhex{bytes: rk.into_inner()}, proof: Hhex{bytes:s.zkproof().to_vec()}, authsig: Hhex{bytes:authsig.into_inner()}});
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
26
test/Spec.hs
26
test/Spec.hs
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue