add longestchain,notarized and difficulty to hushdtab
This commit is contained in:
6
lib/Cargo.lock
generated
6
lib/Cargo.lock
generated
@@ -1051,7 +1051,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=ce987b373505c19784f6482fd900fa1bb988cbce)",
|
||||
"silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=ded8a41fa886a3bfb6e0cefd69c3aedac2abd2a4)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1467,7 +1467,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "silentdragonlitelib"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=ce987b373505c19784f6482fd900fa1bb988cbce#ce987b373505c19784f6482fd900fa1bb988cbce"
|
||||
source = "git+https://github.com/MyHush/silentdragonlite-cli?rev=ded8a41fa886a3bfb6e0cefd69c3aedac2abd2a4#ded8a41fa886a3bfb6e0cefd69c3aedac2abd2a4"
|
||||
dependencies = [
|
||||
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
||||
@@ -2481,7 +2481,7 @@ dependencies = [
|
||||
"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
|
||||
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
||||
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
||||
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=ce987b373505c19784f6482fd900fa1bb988cbce)" = "<none>"
|
||||
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/MyHush/silentdragonlite-cli?rev=ded8a41fa886a3bfb6e0cefd69c3aedac2abd2a4)" = "<none>"
|
||||
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
||||
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
|
||||
"checksum sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b"
|
||||
|
||||
@@ -11,4 +11,4 @@ crate-type = ["staticlib"]
|
||||
[dependencies]
|
||||
libc = "0.2.58"
|
||||
lazy_static = "1.4.0"
|
||||
silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "ce987b373505c19784f6482fd900fa1bb988cbce" }
|
||||
silentdragonlitelib = { git = "https://github.com/MyHush/silentdragonlite-cli", rev = "ded8a41fa886a3bfb6e0cefd69c3aedac2abd2a4" }
|
||||
|
||||
@@ -162,12 +162,18 @@ void Controller::getInfoThenRefresh(bool force) {
|
||||
prevCallSucceeded = true;
|
||||
|
||||
int curBlock = reply["latest_block_height"].get<json::number_integer_t>();
|
||||
int longestchain = reply["longestchain"].get<json::number_integer_t>();
|
||||
int notarized = reply["notarized"].get<json::number_integer_t>();
|
||||
int difficulty = reply["difficulty"].get<json::number_integer_t>();
|
||||
int blocks_until_halving= 340000 - curBlock;
|
||||
char halving_days[8];
|
||||
sprintf(halving_days, "%.2f", (double) (blocks_until_halving * 150) / (60*60*24) );
|
||||
bool doUpdate = force || (model->getLatestBlock() != curBlock);
|
||||
model->setLatestBlock(curBlock);
|
||||
ui->blockHeight->setText(QString::number(curBlock));
|
||||
ui->last_notarized->setText(QString::number(notarized));
|
||||
ui->longestchain->setText(QString::number(longestchain));
|
||||
ui->difficulty->setText(QString::number(difficulty));
|
||||
ui->halvingTime->setText( QString::number(blocks_until_halving) % " blocks, " % QString::fromStdString(halving_days) % " days" );
|
||||
ui->Version->setText(QString::fromStdString(reply["version"].get<json::string_t>()));
|
||||
ui->Vendor->setText(QString::fromStdString(reply["vendor"].get<json::string_t>()));
|
||||
@@ -189,9 +195,9 @@ void Controller::getInfoThenRefresh(bool force) {
|
||||
ui->volumeExchange->setText(" $ " + QString::number((double) Settings::getInstance()->getUSDVolume() ,'f',2));
|
||||
ui->marketcapTab->setText(" $ " + QString::number((double) Settings::getInstance()->getUSDCAP() ,'f',2));
|
||||
} else if (Settings::getInstance()->get_currency_name() == "EUR") {
|
||||
main->statusLabel->setText(" HUSH/EUR=€ " + QString::number( (double) Settings::getInstance()->getEURPrice() ,'f',2));
|
||||
ui->volumeExchange->setText(" € " + QString::number((double) Settings::getInstance()->getEURVolume() ,'f',2));
|
||||
ui->marketcapTab->setText(" € " + QString::number((double) Settings::getInstance()->getEURCAP() ,'f',2));
|
||||
main->statusLabel->setText(" HUSH/EUR= " + QString::number( (double) Settings::getInstance()->getEURPrice() ,'f',2) + " €");
|
||||
ui->volumeExchange->setText(QString::number((double) Settings::getInstance()->getEURVolume() ,'f',2) + " €");
|
||||
ui->marketcapTab->setText(QString::number((double) Settings::getInstance()->getEURCAP() ,'f',2)+ " €");
|
||||
} else if (Settings::getInstance()->get_currency_name() == "BTC") {
|
||||
main->statusLabel->setText(" HUSH/BTC=BTC " + QString::number((double) Settings::getInstance()->getBTCPrice() ,'f',8));
|
||||
ui->volumeExchange->setText(" BTC " + QString::number((double) Settings::getInstance()->getBTCVolume() ,'f',8));
|
||||
|
||||
@@ -1089,14 +1089,77 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="3">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_27">
|
||||
<property name="text">
|
||||
<string>Last Notarized Block</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="QLabel" name="label_26">
|
||||
<property name="text">
|
||||
<string>|</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="2">
|
||||
<widget class="QLabel" name="last_notarized">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="label_25">
|
||||
<property name="text">
|
||||
<string>Longestchain</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QLabel" name="label_28">
|
||||
<property name="text">
|
||||
<string>|</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="2">
|
||||
<widget class="QLabel" name="longestchain">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="label_33">
|
||||
<property name="text">
|
||||
<string>Difficulty</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QLabel" name="label_18">
|
||||
<property name="text">
|
||||
<string>|</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="2">
|
||||
<widget class="QLabel" name="difficulty">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="3">
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="3">
|
||||
<item row="11" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_24">
|
||||
<property name="font">
|
||||
<font>
|
||||
@@ -1108,70 +1171,70 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="3">
|
||||
<item row="12" column="0" colspan="3">
|
||||
<widget class="Line" name="line_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="label_31">
|
||||
<property name="text">
|
||||
<string>Market Cap</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<item row="13" column="1">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="text">
|
||||
<string>|</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="2">
|
||||
<item row="13" column="2">
|
||||
<widget class="QLabel" name="marketcapTab">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<item row="14" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Volume on Exchanges</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="1">
|
||||
<item row="14" column="1">
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>|</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2">
|
||||
<item row="14" column="2">
|
||||
<widget class="QLabel" name="volumeExchange">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="3">
|
||||
<item row="15" column="0" colspan="3">
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0" colspan="3">
|
||||
<item row="16" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>This is a Lightwallet, you cant mine with it!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<item row="17" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -1376,7 +1439,6 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
<tabstop>Address1</tabstop>
|
||||
<tabstop>Amount1</tabstop>
|
||||
<tabstop>Max1</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user