Browse Source

Show transaction list in CSV format when viewing a block; allow viewing block 0

custom_themes
Duke 5 months ago
parent
commit
9e4c26ccd2
  1. 8
      src/mainwindow.cpp

8
src/mainwindow.cpp

@ -912,7 +912,7 @@ void MainWindow::getBlock() {
// First thing is ask the user for a block height
bool ok;
int i = QInputDialog::getInt(this, tr("Get Block Info"),
tr("Enter Block Height:"), 1, 1, 2147483647, 1, &ok);
tr("Enter Block Height:"), 12345, 0, 2147483647, 1, &ok);
if (!ok)
return;
@ -943,7 +943,11 @@ void MainWindow::getBlock() {
property_value = props.toObject()[property_name].toBool() ? "true" : "false" ;
} else if (props.toObject()[property_name].isArray()) {
DEBUG( property_name << " is an array");
//property_value = QString( props.toObject()[property_name][0] ); // TODO: this is only the first tx
auto txs = props.toObject()[property_name].toArray();
for (const auto& tx : txs) {
property_value += tx.toString() + " , ";
}
// property_value = QJsonDocument(txs).toJson();
} else if (props.toObject()[property_name].isObject()) {
DEBUG( property_name << " is an object");
}

Loading…
Cancel
Save