mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
machete, drain > mem::swap for clarity reasons
This commit is contained in:
@@ -284,21 +284,19 @@ pub async fn main_loop<
|
||||
let key_to_activate =
|
||||
KeyToActivate::<KeyFor<S>>::try_recv(txn.as_mut().unwrap()).map(|key| key.0);
|
||||
|
||||
/*
|
||||
`acknowledge_batch` takes burns to optimize handling returns with standard payments.
|
||||
That's why handling these with a Batch (and not waiting until the following potential
|
||||
`queue_burns` call makes sense. As for which Batch, the first is equally valid unless
|
||||
we want to start introspecting (and should be our only Batch anyways).
|
||||
*/
|
||||
let mut this_batchs_burns = vec![];
|
||||
std::mem::swap(&mut burns, &mut this_batchs_burns);
|
||||
|
||||
// This is a cheap call as it internally just queues this to be done later
|
||||
let _: () = scanner.acknowledge_batch(
|
||||
txn.take().unwrap(),
|
||||
id,
|
||||
in_instructions,
|
||||
this_batchs_burns,
|
||||
/*
|
||||
`acknowledge_batch` takes burns to optimize handling returns with standard
|
||||
payments. That's why handling these with a Batch (and not waiting until the
|
||||
following potential `queue_burns` call makes sense. As for which Batch, the first
|
||||
is equally valid unless we want to start introspecting (and should be our only
|
||||
Batch anyways).
|
||||
*/
|
||||
burns.drain(..).collect(),
|
||||
key_to_activate,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ k256 = { version = "^0.13.1", default-features = false, features = ["std"] }
|
||||
|
||||
alloy-core = { version = "0.8", default-features = false }
|
||||
alloy-rlp = { version = "0.3", default-features = false }
|
||||
alloy-consensus = { version = "0.3", default-features = false }
|
||||
|
||||
alloy-rpc-types-eth = { version = "0.3", default-features = false }
|
||||
alloy-transport = { version = "0.3", default-features = false }
|
||||
|
||||
@@ -18,7 +18,6 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
group = { version = "0.13", default-features = false }
|
||||
k256 = { version = "^0.13.1", default-features = false, features = ["std", "ecdsa", "arithmetic"] }
|
||||
|
||||
alloy-core = { version = "0.8", default-features = false }
|
||||
alloy-consensus = { version = "0.3", default-features = false }
|
||||
|
||||
Reference in New Issue
Block a user