mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-14 15:09:23 +00:00
Update monero-wallet tests to compile
Some are _consistently_ failing due to the inputs we attempt to spend being too young. I'm unsure what's up with that. Most seem to pass _consistently_, implying it's not a random issue yet some configuration/env aspect.
This commit is contained in:
@@ -321,11 +321,27 @@ impl SignableTransaction {
|
||||
}
|
||||
}
|
||||
|
||||
let res = SignableTransaction { rct_type, sender_view_key, inputs, payments, data, fee_rate };
|
||||
let mut res =
|
||||
SignableTransaction { rct_type, sender_view_key, inputs, payments, data, fee_rate };
|
||||
res.validate()?;
|
||||
|
||||
// Shuffle the payments
|
||||
{
|
||||
let mut rng = res.seeded_rng(b"shuffle_payments");
|
||||
res.payments.shuffle(&mut rng);
|
||||
}
|
||||
|
||||
Ok(res)
|
||||
}
|
||||
|
||||
pub fn fee_rate(&self) -> FeeRate {
|
||||
self.fee_rate
|
||||
}
|
||||
|
||||
pub fn fee(&self) -> u64 {
|
||||
self.weight_and_fee().1
|
||||
}
|
||||
|
||||
pub fn write<W: io::Write>(&self, w: &mut W) -> io::Result<()> {
|
||||
fn write_input<W: io::Write>(input: &(SpendableOutput, Decoys), w: &mut W) -> io::Result<()> {
|
||||
input.0.write(w)?;
|
||||
@@ -424,12 +440,6 @@ impl SignableTransaction {
|
||||
key_images.push(key_image);
|
||||
}
|
||||
|
||||
// Shuffle the payments
|
||||
{
|
||||
let mut rng = self.seeded_rng(b"shuffle_payments");
|
||||
self.payments.shuffle(&mut rng);
|
||||
}
|
||||
|
||||
SignableTransactionWithKeyImages { intent: self, key_images }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user