Skip to content

Commit a75e41d

Browse files
committed
add SolidEventServiceTest unit test
1 parent ae24ba8 commit a75e41d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

framework/src/test/java/org/tron/core/event/SolidEventServiceTest.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ public class SolidEventServiceTest {
3232

3333
@Test
3434
public void test() throws Exception {
35+
BlockEvent be0 = new BlockEvent();
36+
BlockCapsule.BlockId b0 = new BlockCapsule.BlockId(BlockEventCacheTest.getBlockId(), 1);
37+
be0.setBlockId(b0);
38+
be0.setParentId(b0);
39+
be0.setSolidId(new BlockCapsule.BlockId(BlockEventCacheTest.getBlockId(), 100));
40+
BlockEventCache.init(b0);
41+
BlockEventCache.add(be0);
42+
solidEventService.work();
43+
3544
BlockEvent be1 = new BlockEvent();
3645
BlockCapsule.BlockId b1 = new BlockCapsule.BlockId(BlockEventCacheTest.getBlockId(), 1);
3746
be1.setBlockId(b1);

0 commit comments

Comments
 (0)