Merge pull request #849 from nuttycom/upgrade_incrementalmerkletree
Upgrade `incrementalmerkletree` & `orchard` patch versions.
This commit is contained in:
commit
d56c6624a6
|
@ -21,6 +21,5 @@ codegen-units = 1
|
|||
[patch.crates-io]
|
||||
zcash_encoding = { path = "components/zcash_encoding" }
|
||||
zcash_note_encryption = { path = "components/zcash_note_encryption" }
|
||||
bridgetree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "ea1686e8f8f6c1e41aa97251a7eb4fadfd33df47" }
|
||||
incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "ea1686e8f8f6c1e41aa97251a7eb4fadfd33df47" }
|
||||
orchard = { git = "https://github.com/zcash/orchard.git", rev = "8bc53ecbde0944f59f2321f06f2f4171975c7288" }
|
||||
incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree.git", rev = "62f0c9039b0bee94c16c40c272e19c5922290664" }
|
||||
orchard = { git = "https://github.com/zcash/orchard.git", rev = "11b6858ac81a79675de205980155a49d6f92b71e" }
|
||||
|
|
|
@ -67,21 +67,21 @@ pub fn read_leu64_usize<R: Read>(mut reader: R) -> io::Result<usize> {
|
|||
}
|
||||
|
||||
pub fn write_position<W: Write>(mut writer: W, position: Position) -> io::Result<()> {
|
||||
write_usize_leu64(&mut writer, position.into())
|
||||
writer.write_u64::<LittleEndian>(position.into())
|
||||
}
|
||||
|
||||
pub fn read_position<R: Read>(mut reader: R) -> io::Result<Position> {
|
||||
read_leu64_usize(&mut reader).map(Position::from)
|
||||
reader.read_u64::<LittleEndian>().map(Position::from)
|
||||
}
|
||||
|
||||
pub fn write_address<W: Write>(mut writer: W, addr: Address) -> io::Result<()> {
|
||||
writer.write_u8(addr.level().into())?;
|
||||
write_usize_leu64(&mut writer, addr.index())
|
||||
writer.write_u64::<LittleEndian>(addr.index())
|
||||
}
|
||||
|
||||
pub fn read_address<R: Read>(mut reader: R) -> io::Result<Address> {
|
||||
let level = reader.read_u8().map(Level::from)?;
|
||||
let index = read_leu64_usize(&mut reader).map(usize::from)?;
|
||||
let index = reader.read_u64::<LittleEndian>()?;
|
||||
Ok(Address::from_parts(level, index))
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ impl SaplingProvingContext {
|
|||
);
|
||||
|
||||
// We now have the full witness for our circuit
|
||||
let pos: usize = merkle_path.position().into();
|
||||
let pos: u64 = merkle_path.position().into();
|
||||
let instance = Spend {
|
||||
value_commitment_opening: Some(value_commitment_opening),
|
||||
proof_generation_key: Some(proof_generation_key),
|
||||
|
|
Loading…
Reference in New Issue