Remove mem_info and references to parity-util-mem (#12795)

* Remove mem_info and some references to parity-util-mem

* [Draft] Finish removing references to `parity-util-mem`

* Upgrade dependencies

* Update scripts/ci/deny.toml

Co-authored-by: ordian <write@reusable.software>

* Fix Cargo.lock (remove unwanted dependency changes)

* Removed unused argument

* Run cargo fmt (didn't have pre-commit set up)

* Fix some CI errors

* Fix another CI error

* Remove unused dependency

Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
Marcin S
2022-12-06 09:55:10 -05:00
committed by GitHub
parent 07117e7913
commit aa21e56744
46 changed files with 70 additions and 426 deletions
@@ -84,7 +84,7 @@ pub struct PruneStatus<Hash, Ex> {
/// Immutable transaction
#[cfg_attr(test, derive(Clone))]
#[derive(PartialEq, Eq, parity_util_mem::MallocSizeOf)]
#[derive(PartialEq, Eq)]
pub struct Transaction<Hash, Extrinsic> {
/// Raw extrinsic representing that transaction.
pub data: Extrinsic,
@@ -207,7 +207,7 @@ const RECENTLY_PRUNED_TAGS: usize = 2;
/// as-is for the second time will fail or produce unwanted results.
/// Most likely it is required to revalidate them and recompute set of
/// required tags.
#[derive(Debug, parity_util_mem::MallocSizeOf)]
#[derive(Debug)]
pub struct BasePool<Hash: hash::Hash + Eq, Ex> {
reject_future_transactions: bool,
future: FutureTransactions<Hash, Ex>,
@@ -796,27 +796,6 @@ mod tests {
}
}
#[test]
fn can_track_heap_size() {
let mut pool = pool();
pool.import(Transaction {
data: vec![5u8; 1024],
hash: 5,
provides: vec![vec![0], vec![4]],
..DEFAULT_TX.clone()
})
.expect("import 1 should be ok");
pool.import(Transaction {
data: vec![3u8; 1024],
hash: 7,
provides: vec![vec![2], vec![7]],
..DEFAULT_TX.clone()
})
.expect("import 2 should be ok");
assert!(parity_util_mem::malloc_size(&pool) > 5000);
}
#[test]
fn should_remove_invalid_transactions() {
// given