diff --git a/alethzero/OtherAccounts.cpp b/alethzero/OtherAccounts.cpp index eff030bac..1ad7fd109 100644 --- a/alethzero/OtherAccounts.cpp +++ b/alethzero/OtherAccounts.cpp @@ -34,7 +34,7 @@ DEV_AZ_NOTE_PLUGIN(OtherAccounts); OtherAccounts::OtherAccounts(MainFace* _m): AccountNamerPlugin(_m, "OtherAccounts") { - connect(addMenuItem("New Brain Wallet...", "menuTools", true), SIGNAL(triggered()), SLOT(import())); + connect(addMenuItem("Register Third-party Address Names...", "menuTools", true), SIGNAL(triggered()), SLOT(import())); } void OtherAccounts::import() @@ -48,8 +48,8 @@ void OtherAccounts::import() QStringList sl = u.accounts->toPlainText().split("\n"); for (QString const& s: sl) { - Address addr = toAddress(s.section("[ \\t]+", 0, 1).toStdString()); - string name = s.section("[ \\t]+", 1).toStdString(); + Address addr = dev::eth::toAddress(s.section(QRegExp("[ \\0\\t]+"), 0, 0).toStdString()); + string name = s.section(QRegExp("[ \\0\\t]+"), 1).toStdString(); m_toName[addr] = name; m_toAddress[name] = addr; } diff --git a/alethzero/Transact.cpp b/alethzero/Transact.cpp index 2621977d3..61175496e 100644 --- a/alethzero/Transact.cpp +++ b/alethzero/Transact.cpp @@ -137,7 +137,10 @@ void Transact::updateDestination() ui->destination->clear(); ui->destination->addItem("(Create Contract)"); for (Address const& a: m_main->allKnownAddresses()) + { + cdebug << "Adding" << a << m_main->toName(a) << " -> " << (m_main->toName(a) + " (" + ICAP(a).encoded() + ")"); ui->destination->addItem(QString::fromStdString(m_main->toName(a) + " (" + ICAP(a).encoded() + ")"), QVariant(QByteArray((char const*)a.data(), a.size))); + } } void Transact::updateFee() @@ -348,13 +351,11 @@ GasRequirements Transact::determineGasRequirements() for (unsigned i = 0; i < 20 && ((haveUpperBound && upperBound - lowerBound > 100) || !haveUpperBound); ++i) // get to with 100. { qint64 mid = haveUpperBound ? (lowerBound + upperBound) / 2 : upperBound; - cdebug << "Trying" << mid; ExecutionResult er; if (isCreation()) er = ethereum()->create(from, value(), m_data, mid, gasPrice(), ethereum()->getDefault(), FudgeFactor::Lenient); else er = ethereum()->call(from, value(), to, m_data, mid, gasPrice(), ethereum()->getDefault(), FudgeFactor::Lenient); - cdebug << toString(er.excepted); if (er.excepted == TransactionException::OutOfGas || er.excepted == TransactionException::OutOfGasBase || er.excepted == TransactionException::OutOfGasIntrinsic || er.codeDeposit == CodeDeposit::Failed) { lowerBound = mid;