Commit 2b212d4 pythcoiner
committed
1 parent 3fcbb0b commit 2b212d4 Copy full SHA for 2b212d4
File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -888,13 +888,15 @@ impl DaemonControl {
888
888
/// The date must be after the genesis block time and before the current tip blocktime.
889
889
pub fn start_rescan ( & self , timestamp : u32 ) -> Result < ( ) , CommandError > {
890
890
let mut db_conn = self . db . connection ( ) ;
891
+ let genesis_timestamp = self . bitcoin . genesis_block ( ) . height as u32 ;
892
+
891
893
892
894
let future_timestamp = self
893
895
. bitcoin
894
896
. tip_time ( )
895
897
. map ( |t| timestamp >= t)
896
898
. unwrap_or ( false ) ;
897
- if timestamp < MAINNET_GENESIS_TIME || future_timestamp {
899
+ if timestamp < genesis_timestamp || future_timestamp {
898
900
return Err ( CommandError :: InsaneRescanTimestamp ( timestamp) ) ;
899
901
}
900
902
if db_conn. rescan_timestamp ( ) . is_some ( ) || self . bitcoin . rescan_progress ( ) . is_some ( ) {
You can’t perform that action at this time.
0 commit comments