global: snapshot

This commit is contained in:
nym21
2026-02-13 16:54:09 +01:00
parent d18c872072
commit dfcb04484b
17 changed files with 485 additions and 265 deletions

View File

@@ -16,12 +16,11 @@ impl Query {
if let Some(mempool) = self.mempool() {
let txs = mempool.get_txs();
let mempool_outputs: Vec<_> = txs
.values()
.flat_map(|tx| &tx.tx().output)
.map(|txout| (txout.value, txout.type_()))
.collect();
oracle.process_outputs(mempool_outputs.into_iter());
oracle.process_outputs(
txs.values()
.flat_map(|tx| &tx.tx().output)
.map(|txout| (txout.value, txout.type_())),
);
}
Ok(oracle.price_dollars())