|
|
@ -239,6 +239,21 @@ Main::Main(QWidget *parent) : |
|
|
|
|
|
|
|
ethereum()->setDefault(LatestBlock); |
|
|
|
|
|
|
|
m_vmSelectionGroup = new QActionGroup{ui->menu_Debug}; |
|
|
|
m_vmSelectionGroup->addAction(ui->vmInterpreter); |
|
|
|
m_vmSelectionGroup->addAction(ui->vmJIT); |
|
|
|
m_vmSelectionGroup->addAction(ui->vmSmart); |
|
|
|
m_vmSelectionGroup->setExclusive(true); |
|
|
|
|
|
|
|
#if ETH_EVMJIT |
|
|
|
ui->vmSmart->setChecked(true); // Default when JIT enabled
|
|
|
|
on_vmSmart_triggered(); |
|
|
|
#else |
|
|
|
ui->vmInterpreter->setChecked(true); |
|
|
|
ui->vmJIT->setEnabled(false); |
|
|
|
ui->vmSmart->setEnabled(false); |
|
|
|
#endif |
|
|
|
|
|
|
|
readSettings(); |
|
|
|
|
|
|
|
m_transact = new Transact(this, this); |
|
|
@ -247,10 +262,6 @@ Main::Main(QWidget *parent) : |
|
|
|
|
|
|
|
#if !ETH_FATDB |
|
|
|
removeDockWidget(ui->dockWidget_accounts); |
|
|
|
#endif |
|
|
|
#if !ETH_EVMJIT |
|
|
|
ui->jitvm->setEnabled(false); |
|
|
|
ui->jitvm->setChecked(false); |
|
|
|
#endif |
|
|
|
installWatches(); |
|
|
|
startTimer(100); |
|
|
@ -723,7 +734,8 @@ void Main::writeSettings() |
|
|
|
s.setValue("url", ui->urlEdit->text()); |
|
|
|
s.setValue("privateChain", m_privateChain); |
|
|
|
s.setValue("verbosity", ui->verbosity->value()); |
|
|
|
s.setValue("jitvm", ui->jitvm->isChecked()); |
|
|
|
if (auto vm = m_vmSelectionGroup->checkedAction()) |
|
|
|
s.setValue("vm", vm->text()); |
|
|
|
|
|
|
|
bytes d = m_webThree->saveNetwork(); |
|
|
|
if (!d.empty()) |
|
|
@ -814,8 +826,28 @@ void Main::readSettings(bool _skipGeometry) |
|
|
|
m_privateChain = s.value("privateChain", "").toString(); |
|
|
|
ui->usePrivate->setChecked(m_privateChain.size()); |
|
|
|
ui->verbosity->setValue(s.value("verbosity", 1).toInt()); |
|
|
|
ui->jitvm->setChecked(s.value("jitvm", true).toBool()); |
|
|
|
on_jitvm_triggered(); |
|
|
|
|
|
|
|
#if ETH_EVMJIT // We care only if JIT is enabled. Otherwise it can cause misconfiguration.
|
|
|
|
auto vmName = s.value("vm").toString(); |
|
|
|
if (!vmName.isEmpty()) |
|
|
|
{ |
|
|
|
if (vmName == ui->vmInterpreter->text()) |
|
|
|
{ |
|
|
|
ui->vmInterpreter->setChecked(true); |
|
|
|
on_vmInterpreter_triggered(); |
|
|
|
} |
|
|
|
else if (vmName == ui->vmJIT->text()) |
|
|
|
{ |
|
|
|
ui->vmJIT->setChecked(true); |
|
|
|
on_vmJIT_triggered(); |
|
|
|
} |
|
|
|
else if (vmName == ui->vmSmart->text()) |
|
|
|
{ |
|
|
|
ui->vmSmart->setChecked(true); |
|
|
|
on_vmSmart_triggered(); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
ui->urlEdit->setText(s.value("url", "about:blank").toString()); //http://gavwood.com/gavcoin.html
|
|
|
|
on_urlEdit_returnPressed(); |
|
|
@ -992,11 +1024,9 @@ void Main::on_usePrivate_triggered() |
|
|
|
on_killBlockchain_triggered(); |
|
|
|
} |
|
|
|
|
|
|
|
void Main::on_jitvm_triggered() |
|
|
|
{ |
|
|
|
bool jit = ui->jitvm->isChecked(); |
|
|
|
VMFactory::setKind(jit ? VMKind::JIT : VMKind::Interpreter); |
|
|
|
} |
|
|
|
void Main::on_vmInterpreter_triggered() { VMFactory::setKind(VMKind::Interpreter); } |
|
|
|
void Main::on_vmJIT_triggered() { VMFactory::setKind(VMKind::JIT); } |
|
|
|
void Main::on_vmSmart_triggered() { VMFactory::setKind(VMKind::Smart); } |
|
|
|
|
|
|
|
void Main::on_urlEdit_returnPressed() |
|
|
|
{ |
|
|
|