mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-10 21:19:24 +00:00
Add a TX size check to Monero
This isn't perfect yet should ensure the eventual TX is less than 100k bytes.
This commit is contained in:
@@ -37,6 +37,7 @@ impl Bulletproofs {
|
||||
pub(crate) fn fee_weight(plus: bool, outputs: usize) -> usize {
|
||||
let fields = if plus { 6 } else { 9 };
|
||||
|
||||
// TODO: Shouldn't this use u32/u64?
|
||||
#[allow(non_snake_case)]
|
||||
let mut LR_len = usize::try_from(usize::BITS - (outputs - 1).leading_zeros()).unwrap();
|
||||
let padded_outputs = 1 << LR_len;
|
||||
|
||||
Reference in New Issue
Block a user