mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add fee handling code to Monero
Updates how change outputs are handled, with a far more logical construction offering greater flexibility. prepare_outputs can not longer error. SignaableTransaction::new will.
This commit is contained in:
@@ -15,7 +15,8 @@ use crate::{
|
||||
Commitment,
|
||||
wallet::decoys::Decoys,
|
||||
random_scalar, hash_to_scalar, hash_to_point,
|
||||
serialize::*
|
||||
serialize::*,
|
||||
transaction::RING_LEN
|
||||
};
|
||||
|
||||
#[cfg(feature = "multisig")]
|
||||
@@ -287,6 +288,10 @@ impl Clsag {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) fn fee_weight() -> usize {
|
||||
(RING_LEN * 32) + 32 + 32
|
||||
}
|
||||
|
||||
pub fn serialize<W: std::io::Write>(&self, w: &mut W) -> std::io::Result<()> {
|
||||
write_raw_vec(write_scalar, &self.s, w)?;
|
||||
w.write_all(&self.c1.to_bytes())?;
|
||||
|
||||
Reference in New Issue
Block a user