mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-12 14:09:25 +00:00
Handle Monero fee logic properly in the processor
This commit is contained in:
@@ -181,7 +181,7 @@ async fn select_decoys<R: RngCore + CryptoRng>(
|
||||
|
||||
// TODO: Create a TX with less than the target amount, as allowed by the protocol
|
||||
let high = distribution[distribution.len() - DEFAULT_LOCK_WINDOW];
|
||||
if high.saturating_sub(COINBASE_LOCK_WINDOW as u64) <
|
||||
if high.saturating_sub(u64::try_from(COINBASE_LOCK_WINDOW).unwrap()) <
|
||||
u64::try_from(inputs.len() * ring_len).unwrap()
|
||||
{
|
||||
Err(RpcError::InternalError("not enough coinbase candidates".to_string()))?;
|
||||
|
||||
@@ -137,8 +137,8 @@ pub async fn rpc() -> SimpleRequestRpc {
|
||||
&Scalar::random(&mut OsRng) * ED25519_BASEPOINT_TABLE,
|
||||
);
|
||||
|
||||
// Mine 40 blocks to ensure decoy availability
|
||||
rpc.generate_blocks(&addr, 40).await.unwrap();
|
||||
// Mine 80 blocks to ensure decoy availability
|
||||
rpc.generate_blocks(&addr, 80).await.unwrap();
|
||||
|
||||
rpc
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user