pub struct BatchProof {
pub targets: Vec<VarInt>,
pub hashes: Vec<BlockHash>,
}Expand description
BatchProof serialization defines how the utreexo accumulator proof will be serialized both for i/o.
Note that this serialization format differs from the one from github.com/mit-dci/utreexo/accumulator as this serialization method uses varints and the one in that package does not. They are not compatible and should not be used together. The serialization method here is more compact and thus is better for wire and disk storage.
The serialized format is:
[<target count><targets><proof count><proofs>]
All together, the serialization looks like so: Field Type Size target count varint 1-8 bytes targets []uint64 variable hash count varint 1-8 bytes hashes []32 byte variable
Fields§
§targets: Vec<VarInt>All targets that’ll be deleted
hashes: Vec<BlockHash>The inner hashes of a proof
Trait Implementations§
Source§impl Clone for BatchProof
impl Clone for BatchProof
Source§fn clone(&self) -> BatchProof
fn clone(&self) -> BatchProof
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BatchProof
impl Debug for BatchProof
Source§impl Default for BatchProof
impl Default for BatchProof
Source§fn default() -> BatchProof
fn default() -> BatchProof
Source§impl From<&BatchProof> for Proof
impl From<&BatchProof> for Proof
Source§fn from(batch_proof: &BatchProof) -> Self
fn from(batch_proof: &BatchProof) -> Self
Source§impl PartialEq for BatchProof
impl PartialEq for BatchProof
impl Eq for BatchProof
impl StructuralPartialEq for BatchProof
Auto Trait Implementations§
impl Freeze for BatchProof
impl RefUnwindSafe for BatchProof
impl Send for BatchProof
impl Sync for BatchProof
impl Unpin for BatchProof
impl UnwindSafe for BatchProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more