@@ -51,13 +51,13 @@ public class DepositProcessingController {
51
51
private final Eth1BlockFetcher eth1BlockFetcher ;
52
52
53
53
public DepositProcessingController (
54
- SpecConfig config ,
55
- Eth1Provider eth1Provider ,
56
- Eth1EventsChannel eth1EventsChannel ,
57
- AsyncRunner asyncRunner ,
58
- DepositFetcher depositFetcher ,
59
- Eth1BlockFetcher eth1BlockFetcher ,
60
- Eth1HeadTracker headTracker ) {
54
+ final SpecConfig config ,
55
+ final Eth1Provider eth1Provider ,
56
+ final Eth1EventsChannel eth1EventsChannel ,
57
+ final AsyncRunner asyncRunner ,
58
+ final DepositFetcher depositFetcher ,
59
+ final Eth1BlockFetcher eth1BlockFetcher ,
60
+ final Eth1HeadTracker headTracker ) {
61
61
this .config = config ;
62
62
this .eth1Provider = eth1Provider ;
63
63
this .eth1EventsChannel = eth1EventsChannel ;
@@ -73,7 +73,7 @@ public synchronized void switchToBlockByBlockMode() {
73
73
}
74
74
75
75
// inclusive of start block
76
- public synchronized void startSubscription (BigInteger subscriptionStartBlock ) {
76
+ public synchronized void startSubscription (final BigInteger subscriptionStartBlock ) {
77
77
LOG .debug ("Starting subscription at block {}" , subscriptionStartBlock );
78
78
latestSuccessfullyQueriedBlock = subscriptionStartBlock .subtract (BigInteger .ONE );
79
79
newBlockSubscription = headTracker .subscribe (this ::onNewCanonicalBlockNumber );
@@ -89,7 +89,7 @@ public synchronized SafeFuture<Void> fetchDepositsInRange(
89
89
return depositFetcher .fetchDepositsInRange (fromBlockNumber , toBlockNumber );
90
90
}
91
91
92
- private synchronized void onNewCanonicalBlockNumber (UInt64 newCanonicalBlockNumber ) {
92
+ private synchronized void onNewCanonicalBlockNumber (final UInt64 newCanonicalBlockNumber ) {
93
93
this .latestCanonicalBlockNumber = newCanonicalBlockNumber .bigIntegerValue ();
94
94
fetchLatestSubscriptionDeposits ();
95
95
}
@@ -165,7 +165,8 @@ private boolean isActiveOrAlreadyQueriedLatestCanonicalBlock() {
165
165
return active || latestCanonicalBlockNumber .compareTo (latestSuccessfullyQueriedBlock ) <= 0 ;
166
166
}
167
167
168
- private synchronized void onSubscriptionDepositRequestSuccessful (BigInteger requestToBlock ) {
168
+ private synchronized void onSubscriptionDepositRequestSuccessful (
169
+ final BigInteger requestToBlock ) {
169
170
active = false ;
170
171
latestSuccessfullyQueriedBlock = requestToBlock ;
171
172
if (latestCanonicalBlockNumber .compareTo (latestSuccessfullyQueriedBlock ) > 0 ) {
@@ -177,12 +178,12 @@ private synchronized void onSubscriptionDepositRequestSuccessful(BigInteger requ
177
178
}
178
179
179
180
private synchronized void onSubscriptionDepositRequestFailed (
180
- Throwable err , BigInteger fromBlock ) {
181
+ final Throwable err , final BigInteger fromBlock ) {
181
182
onSubscriptionDepositRequestFailed (err , fromBlock , fromBlock );
182
183
}
183
184
184
185
private synchronized void onSubscriptionDepositRequestFailed (
185
- Throwable err , BigInteger fromBlock , BigInteger toBlock ) {
186
+ final Throwable err , final BigInteger fromBlock , final BigInteger toBlock ) {
186
187
active = false ;
187
188
188
189
if (Throwables .getRootCause (err ) instanceof InvalidDepositEventsException ) {
0 commit comments