File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/src/main/java/io/scalaproject/vault/util Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ public class RestoreHeight {
3434 static private RestoreHeight Singleton = null ;
3535
3636 static public final Integer GENESISBLOCK_DATE_YEAR = 2020 ;
37+ static public final Integer GENESISBLOCK_DATE_MONTH = 7 ;
3738 static public final String GENESISBLOCK_DATE = "2020-07-31" ;
3839
3940 static private final String CHECKPOINT_DATE = "2020-08-07" ;
@@ -86,7 +87,10 @@ public long getHeight(final Date date) {
8687 cal .setTime (date );
8788 cal .add (Calendar .DAY_OF_MONTH , -4 ); // give it some leeway
8889
89- if (date .before (getGenesisBLockDate ()))
90+ if (cal .get (Calendar .YEAR ) < GENESISBLOCK_DATE_YEAR )
91+ return 0 ;
92+ if ((cal .get (Calendar .YEAR ) == GENESISBLOCK_DATE_YEAR ) && (cal .get (Calendar .MONTH ) <= GENESISBLOCK_DATE_MONTH ))
93+ // before July 2020
9094 return 0 ;
9195
9296 Calendar query = (Calendar ) cal .clone ();
You can’t perform that action at this time.
0 commit comments