Merge pull request #3846

ef56194 Wizard: fix stagenet approx blockheight (selsta)
This commit is contained in:
luigi1111 2022-06-09 13:53:20 -05:00
commit 3031e7c37f
No known key found for this signature in database
GPG key ID: F4ACA0183641E010

View file

@ -164,9 +164,9 @@ function getApproximateBlockchainHeight(_date, _nettype){
secondsPerBlock = secondsPerBlockV2;
}
if(_nettype == "Testnet"){
if(_nettype == "Testnet" || _nettype == "Stagenet"){
// testnet got some huge rollbacks, so the estimation is way off
var approximateTestnetRolledBackBlocks = 342100;
var approximateTestnetRolledBackBlocks = _nettype == "Testnet" ? 342100 : 30000;
if(approxBlockchainHeight > approximateTestnetRolledBackBlocks)
approxBlockchainHeight -= approximateTestnetRolledBackBlocks
}