declone and close the door (#12035)

* declone and close the door

* cargo fmt

* remove brackets
This commit is contained in:
Squirrel
2022-08-15 20:38:36 +01:00
committed by GitHub
parent 9c2a2495fe
commit a68a80fbae
72 changed files with 344 additions and 512 deletions
@@ -641,7 +641,7 @@ mod tests {
.unwrap();
// when
block_on(pool.prune_tags(&BlockId::Number(1), vec![vec![0]], vec![hash1.clone()])).unwrap();
block_on(pool.prune_tags(&BlockId::Number(1), vec![vec![0]], vec![hash1])).unwrap();
// then
assert!(pool.validated_pool.is_banned(&hash1));
@@ -793,12 +793,8 @@ mod tests {
assert_eq!(pool.validated_pool().status().future, 0);
// when
block_on(pool.prune_tags(
&BlockId::Number(2),
vec![vec![0u8]],
vec![watcher.hash().clone()],
))
.unwrap();
block_on(pool.prune_tags(&BlockId::Number(2), vec![vec![0u8]], vec![*watcher.hash()]))
.unwrap();
assert_eq!(pool.validated_pool().status().ready, 0);
assert_eq!(pool.validated_pool().status().future, 0);
@@ -120,7 +120,7 @@ mod tests {
let tx = Transaction {
data: (),
bytes: 1,
hash: hash.clone(),
hash,
priority: 5,
valid_till: 1,
requires: vec![],