Skip to content

Commit

Permalink
Block Browser right click txid in tx page will also set block info
Browse files Browse the repository at this point in the history
  • Loading branch information
Tranz5 committed Sep 4, 2014
1 parent f4f3986 commit 463be5a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/qt/blockbrowser.cpp
Expand Up @@ -415,6 +415,20 @@ void BlockBrowser::setTransactionId(const QString &transactionId)
ui->txBox->setText(transactionId);
ui->txBox->setFocus();
updateExplorer(false);

uint256 hash;
hash.SetHex(transactionId.toStdString());

CTransaction tx;
uint256 hashBlock = 0;
if (GetTransaction(hash, tx, hashBlock))
{
CBlockIndex* pblockindex = mapBlockIndex[hashBlock];
pblockindex->nHeight;

ui->heightBox->setValue(pblockindex->nHeight);
updateExplorer(true);
}
}

void BlockBrowser::txClicked()
Expand Down

0 comments on commit 463be5a

Please sign in to comment.