mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-12 14:09:25 +00:00
Add SignableTransaction Read/Write
This commit is contained in:
@@ -97,13 +97,6 @@ impl Bulletproof {
|
||||
(bp_clawback, LR_len)
|
||||
}
|
||||
|
||||
/// Calculate the weight of this proof.
|
||||
pub fn fee_weight(plus: bool, outputs: usize) -> usize {
|
||||
#[allow(non_snake_case)]
|
||||
let (bp_clawback, LR_len) = Bulletproof::calculate_bp_clawback(plus, outputs);
|
||||
32 * (Bulletproof::bp_fields(plus) + (2 * LR_len)) + 2 + bp_clawback
|
||||
}
|
||||
|
||||
/// Prove the list of commitments are within [0 .. 2^64) with an aggregate Bulletproof.
|
||||
pub fn prove<R: RngCore + CryptoRng>(
|
||||
rng: &mut R,
|
||||
|
||||
@@ -386,11 +386,6 @@ impl Clsag {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The length a CLSAG will take once serialized.
|
||||
pub fn fee_weight(ring_len: usize) -> usize {
|
||||
(ring_len * 32) + 32 + 32
|
||||
}
|
||||
|
||||
/// Write a CLSAG.
|
||||
pub fn write<W: Write>(&self, w: &mut W) -> io::Result<()> {
|
||||
write_raw_vec(write_scalar, &self.s, w)?;
|
||||
|
||||
Reference in New Issue
Block a user