diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 08b67b9f8..516e5759a 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -37,6 +37,8 @@ using eth::compileLisp; using eth::disassemble; using eth::formatBalance; using eth::fromHex; +using eth::sha3; +using eth::left160; using eth::right160; using eth::simpleDebugOut; using eth::toLog2; @@ -287,7 +289,7 @@ void Main::refresh(bool _override) QString("%2 +> %3: %1 [%4]") .arg(formatBalance(t.value).c_str()) .arg(render(t.safeSender())) - .arg(render(right160(t.sha3()))) + .arg(render(left160(sha3(rlpList(t.safeSender(), t.nonce))))) .arg((unsigned)t.nonce); ui->transactionQueue->addItem(s); } @@ -313,7 +315,7 @@ void Main::refresh(bool _override) QString(" %2 +> %3: %1 [%4]") .arg(formatBalance(t.value).c_str()) .arg(render(t.safeSender())) - .arg(render(right160(t.sha3()))) + .arg(render(left160(sha3(rlpList(t.safeSender(), t.nonce))))) .arg((unsigned)t.nonce); QListWidgetItem* txItem = new QListWidgetItem(s, ui->blocks); txItem->setData(Qt::UserRole, QByteArray((char const*)h.data(), h.size)); @@ -390,13 +392,13 @@ void Main::on_blocks_currentItemChanged() { unsigned txi = item->data(Qt::UserRole + 1).toInt(); Transaction tx(block[1][txi].data()); - h256 th = tx.sha3(); + auto ss = tx.safeSender(); + h256 th = sha3(rlpList(ss, tx.nonce)); s << "

" << th << "

"; s << "

" << h << "[" << txi << "]

"; - auto ss = tx.safeSender(); s << "
From: " << pretty(ss).toStdString() << " " << ss; if (tx.isCreation()) - s << "
Creates: " << pretty(right160(th)).toStdString() << " " << right160(th); + s << "
Creates: " << pretty(left160(th)).toStdString() << " " << left160(th); else s << "
To: " << pretty(tx.receiveAddress).toStdString() << " " << tx.receiveAddress; s << "
Value: " << formatBalance(tx.value) << ""; diff --git a/libethereum/Instruction.cpp b/libethereum/Instruction.cpp index 8671e97b0..41e421264 100644 --- a/libethereum/Instruction.cpp +++ b/libethereum/Instruction.cpp @@ -529,6 +529,7 @@ static int compileLispFragment(char const*& d, char const* e, bool _quiet, bytes return false; unsigned startLocation = (unsigned)o_code.size(); + o_locs.push_back(startLocation); // First fragment - predicate appendCode(o_code, o_locs, codes[0], locs[0]);