Add sapling support while generating addresses

This commit is contained in:
Aditya Kulkarni
2018-10-21 21:50:35 -07:00
parent f53ba144f9
commit f3bd295996
8 changed files with 121 additions and 49 deletions

View File

@@ -152,6 +152,11 @@ void Settings::setTestnet(bool isTestnet) {
this->_isTestnet = isTestnet;
}
bool Settings::isSaplingAddress(QString addr) {
return ( isTestnet() && addr.startsWith("ztestsapling")) ||
(!isTestnet() && addr.startsWith("zs"));
}
bool Settings::isSyncing() {
return _isSyncing;
}
@@ -160,6 +165,19 @@ void Settings::setSyncing(bool syncing) {
this->_isSyncing = syncing;
}
int Settings::getBlockNumber() {
return this->_blockNumber;
}
void Settings::setBlockNumber(int number) {
this->_blockNumber = number;
}
bool Settings::isSaplingActive() {
return (isTestnet() && getBlockNumber() > 280000) ||
(!isTestnet() && getBlockNumber() > 419200);
}
double Settings::getZECPrice() {
return zecPrice;
}