@@ -62,6 +62,7 @@ public class WalletManagerHyperty extends AbstractHyperty {
62
62
private static final int initialBalance = 50 ;
63
63
64
64
private static int engageRating ;
65
+ private static long challengeExpire ;
65
66
66
67
@ Override
67
68
public void start () {
@@ -75,6 +76,8 @@ public void start() {
75
76
int rankingTimer = config ().getInteger ("rankingTimer" );
76
77
onReadMaxTransactions = config ().getInteger ("onReadMaxTransactions" );
77
78
engageRating = config ().getInteger ("engageRating" );
79
+ challengeExpire = config ().getLong ("challengeExpire" );
80
+
78
81
79
82
if (publicWallets != null ) {
80
83
createPublicWallets (publicWallets );
@@ -1305,12 +1308,20 @@ private void validateTransaction(JsonObject transaction, String walletAddress) {
1305
1308
Future <Void > updatedTransaction = transferToPrivateWallet (walletAddress , transaction );
1306
1309
1307
1310
updatedTransaction .setHandler (asyncResult -> {
1308
- String publicWalletAddress = wallet .getString (causeWalletAddress );
1309
- if (publicWalletAddress != null ) {
1310
- // update wallet2bGranted balance
1311
- transferToPublicWallet (publicWalletAddress , transaction );
1311
+
1312
+
1313
+ Long currentTime = new Date ().getTime ();
1314
+ logger .debug (" current:" + currentTime +"\n challengeExpire:" +challengeExpire );
1315
+ if (currentTime < challengeExpire ) {
1316
+ String publicWalletAddress = wallet .getString (causeWalletAddress );
1317
+ if (publicWalletAddress != null ) {
1318
+ // update wallet2bGranted balance
1319
+ transferToPublicWallet (publicWalletAddress , transaction );
1320
+ }
1321
+ } else {
1322
+ logger .debug ("challengeExpire" );
1312
1323
}
1313
-
1324
+
1314
1325
});
1315
1326
1316
1327
// check if nonce is repeated
0 commit comments