semiotic-ai / timeline-aggregation-protocol

A fast, efficient and trust-minimized unidirectional micro-payments system.
Apache License 2.0
14 stars 3 forks source link

feat!: add limit to receipts retrieve #190

Closed aasseman closed 10 months ago

aasseman commented 11 months ago

Helps with keeping the rule of 15,000 max receipts per aggregation request. Also adds a helper function to implement the limit safely.

Note about tap_core/Cargo.toml:

I started getting

error[E0599]: no function or associated item named `new` found for struct `tokio::runtime::Runtime` in the current scope
  --> tap_core/benches/timeline_aggretion_protocol_benchmark.rs:49:34
   |
49 |     let async_runtime = Runtime::new().unwrap();
   |                                  ^^^ function or associated item not found in `Runtime`

Not sure why it even started happening, but the fix was to add the rt-multi-thread feature to tokio :shrug:

github-actions[bot] commented 11 months ago

🤖 Cargo Audit Report 🤖

(Empty means OK! 👍)

github-actions[bot] commented 11 months ago

🤖 Cargo Audit Report 🤖

(Empty means OK! 👍)

github-actions[bot] commented 11 months ago

Pull Request Test Coverage Report for Build 7022943430


Changes Missing Coverage Covered Lines Changed/Added Lines %
tap_core/src/adapters/receipt_storage_adapter.rs 31 34 91.18%
tap_core/src/adapters/test/receipt_storage_adapter_mock.rs 7 10 70.0%
<!-- Total: 48 54 88.89% -->
Totals Coverage Status
Change from base Build 7013080532: 0.2%
Covered Lines: 1273
Relevant Lines: 1542

💛 - Coveralls
aasseman commented 10 months ago

Rebased onto latest main

github-actions[bot] commented 10 months ago

🤖 Cargo Audit Report 🤖

(Empty means OK! 👍)

aasseman commented 10 months ago

Rebased onto latest main

github-actions[bot] commented 10 months ago

🤖 Cargo Audit Report 🤖

(Empty means OK! 👍)