// else runs a request, we keep this to 12. const PARALLEL_REQUESTS: usize = 12; std::thread::spawn(move || { let rt = tokio::runtime::Builder::new_multi_thread() .enable_all() .build() .unwrap(); rt.block_on(async move { loop { let Some(outpoint) = outpoint_receiver.recv().await else { log::debug!("Outpoint channel closed"); return; }; // There's no try_iter on tokio::sync::mpsc::Receiver like std::sync::mpsc::Receiver. // So we just loop until BATCH_SIZE doing try_recv until it returns None. let mut outpoints = vec![outpoint]; for _ in 0..BATCH_SIZE - 1 { let Ok(outpoint) = outpoint_receiver.try_recv() else { break; }; outpoints.push(outpoint); } // Break outpoints into chunks for parallel requests let chunk_size = (outpoints.len() / PARALLEL_REQUESTS) + 1; let mut futs = Vec::with_capacity(PARALLEL_REQUESTS);

Inscription #44965424

ID

410ac40aa3...5a2047d9i0

Detail

History

Action
Price
Marketplace
From
To
Time

TRANSFER

-

-

2jfg9wcq

8 months

INSCRIBED

-

-

-2jfg

8 months

Sign Up for our Newsletter

And be the first to know about any updates!

OrdinalHub logo

All Rights Reserved OrdinalHub.com 2024

Support

Follow Us