We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
split_at
split_off
1 parent b981410 commit b83b153Copy full SHA for b83b153
lightning-transaction-sync/src/electrum.rs
@@ -248,9 +248,10 @@ where
248
debug_assert_eq!(num_output_spend_lookups, sync_state.watched_outputs.len());
249
250
match self.client.batch_script_get_history(&watched_script_pubkeys) {
251
- Ok(mut tx_results) => {
252
- let output_results = tx_results.split_off(num_tx_lookups);
+ Ok(results) => {
+ let (tx_results, output_results) = results.split_at(num_tx_lookups);
253
debug_assert_eq!(num_output_spend_lookups, output_results.len());
254
+
255
for (i, script_history) in tx_results.iter().enumerate() {
256
let (txid, tx) = &watched_txs[i];
257
let mut filtered_history = script_history.iter().filter(|h| h.tx_hash == **txid);
0 commit comments