Browse Source

Merge pull request #2423 from chriseth/exportStateCrash

Prevent crash if not compiled with FATDB.
cl-refactor
Gav Wood 10 years ago
parent
commit
357353629a
  1. 10
      alethzero/ExportState.cpp

10
alethzero/ExportState.cpp

@ -127,6 +127,8 @@ void ExportStateDialog::fillContracts()
ui->contracts->clear();
ui->accounts->setEnabled(true);
ui->contracts->setEnabled(true);
try
{
for (auto i: ethereum()->addresses(m_block))
{
string r = m_main->render(i);
@ -134,6 +136,14 @@ void ExportStateDialog::fillContracts()
->setData(Qt::UserRole, QByteArray((char const*)i.data(), Address::size));
}
}
catch (InterfaceNotSupported const&)
{
ui->accounts->setEnabled(false);
ui->contracts->setEnabled(false);
ui->json->setEnabled(false);
ui->json->setText(QString("This feature requires compilation with FATDB support."));
}
}
void ExportStateDialog::generateJSON()
{

Loading…
Cancel
Save