Skip to content

Commit 038d935

Browse files
committed
rich-indexer: Remove uncle block related unit tests
1 parent 74feb70 commit 038d935

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

util/rich-indexer/src/tests/insert.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ async fn test_append_block_0() {
4242
.await
4343
.unwrap()
4444
);
45-
assert_eq!(
46-
0,
47-
storage
48-
.fetch_count("block_association_uncle")
49-
.await
50-
.unwrap()
51-
);
5245
assert_eq!(
5346
0,
5447
storage

util/rich-indexer/src/tests/rollback.rs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ async fn test_rollback_block_0() {
3535
.await
3636
.unwrap()
3737
);
38-
assert_eq!(
39-
0,
40-
storage
41-
.fetch_count("block_association_uncle")
42-
.await
43-
.unwrap()
44-
);
4538
assert_eq!(
4639
0,
4740
storage
@@ -71,7 +64,7 @@ async fn test_rollback_block_9() {
7164
);
7265
insert_blocks(storage.clone()).await;
7366

74-
assert_eq!(15, storage.fetch_count("block").await.unwrap()); // 10 blocks, 5 uncles
67+
assert_eq!(10, storage.fetch_count("block").await.unwrap()); // 10 blocks
7568
assert_eq!(11, storage.fetch_count("ckb_transaction").await.unwrap());
7669
assert_eq!(12, storage.fetch_count("output").await.unwrap());
7770
assert_eq!(1, storage.fetch_count("input").await.unwrap());
@@ -83,13 +76,6 @@ async fn test_rollback_block_9() {
8376
.await
8477
.unwrap()
8578
);
86-
assert_eq!(
87-
5,
88-
storage
89-
.fetch_count("block_association_uncle")
90-
.await
91-
.unwrap()
92-
);
9379
assert_eq!(
9480
0,
9581
storage
@@ -107,7 +93,7 @@ async fn test_rollback_block_9() {
10793

10894
indexer.rollback().await.unwrap();
10995

110-
assert_eq!(12, storage.fetch_count("block").await.unwrap()); // 9 blocks, 3 uncles
96+
assert_eq!(9, storage.fetch_count("block").await.unwrap()); // 9 blocks
11197
assert_eq!(10, storage.fetch_count("ckb_transaction").await.unwrap());
11298
assert_eq!(12, storage.fetch_count("output").await.unwrap());
11399
assert_eq!(1, storage.fetch_count("input").await.unwrap());
@@ -119,13 +105,6 @@ async fn test_rollback_block_9() {
119105
.await
120106
.unwrap()
121107
);
122-
assert_eq!(
123-
3,
124-
storage
125-
.fetch_count("block_association_uncle")
126-
.await
127-
.unwrap()
128-
);
129108
assert_eq!(
130109
0,
131110
storage

0 commit comments

Comments
 (0)