File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
main/java/org/tron/common/overlay/server
test/java/org/tron/core/net/node Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -80,16 +80,13 @@ public class SyncPool {
8080
8181 private PeerClient peerClient ;
8282
83- @ Autowired
84- public SyncPool (PeerClient peerClient ) {
85- this .peerClient = peerClient ;
86- }
87-
8883 public void init (PeerConnectionDelegate peerDel ) {
8984 this .peerDel = peerDel ;
9085
9186 channelManager = ctx .getBean (ChannelManager .class );
9287
88+ peerClient = ctx .getBean (PeerClient .class );
89+
9390 poolLoopExecutor .scheduleWithFixedDelay (() -> {
9491 try {
9592 fillUp ();
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ public void testDisconnectInactive() {
192192 peer3 .setSyncBlockRequested (syncBlockRequested3 );
193193
194194 // fetch failed
195- SyncPool pool = new SyncPool (new PeerClient () );
195+ SyncPool pool = new SyncPool ();
196196 pool .addActivePeers (peer1 );
197197 nodeImpl .setPool (pool );
198198 try {
@@ -203,7 +203,7 @@ public void testDisconnectInactive() {
203203 }
204204
205205 // sync failed
206- pool = new SyncPool (new PeerClient () );
206+ pool = new SyncPool ();
207207 pool .addActivePeers (peer2 );
208208 nodeImpl .setPool (pool );
209209 try {
@@ -214,7 +214,7 @@ public void testDisconnectInactive() {
214214 }
215215
216216 // should not disconnect
217- pool = new SyncPool (new PeerClient () );
217+ pool = new SyncPool ();
218218 pool .addActivePeers (peer3 );
219219 nodeImpl .setPool (pool );
220220 try {
You can’t perform that action at this time.
0 commit comments