mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
fix coinbase txs
This commit is contained in:
parent
143018b5aa
commit
afca5e9dd6
2 changed files with 20 additions and 7 deletions
|
@ -143,7 +143,17 @@ MicroCore::get_tx(const crypto::hash& tx_hash, transaction& tx)
|
|||
}
|
||||
catch (TX_DNE const& e)
|
||||
{
|
||||
cerr << "MicroCore::get_tx: " << e.what() << endl;
|
||||
try
|
||||
{
|
||||
// coinbase txs are not considered pruned
|
||||
tx = m_blockchain_storage.get_db().get_pruned_tx(tx_hash);
|
||||
return true;
|
||||
}
|
||||
catch (TX_DNE const& e)
|
||||
{
|
||||
cerr << "MicroCore::get_tx: " << e.what() << endl;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
15
src/page.h
15
src/page.h
|
@ -4506,11 +4506,6 @@ json_transaction(string tx_hash_str)
|
|||
no_confirmations = txd.no_confirmations;
|
||||
}
|
||||
|
||||
// get tx from tx fetched. can be use to double check
|
||||
// if what we return in the json response agrees with
|
||||
// what tx_hash was requested
|
||||
string tx_hash_str_again = pod_to_hex(get_transaction_hash(tx));
|
||||
|
||||
// get basic tx info
|
||||
j_data = get_tx_json(tx, txd);
|
||||
|
||||
|
@ -6490,7 +6485,15 @@ get_tx_details(const transaction& tx,
|
|||
tx_details txd;
|
||||
|
||||
// get tx hash
|
||||
txd.hash = get_transaction_hash(tx);
|
||||
|
||||
if (!tx.pruned)
|
||||
{
|
||||
txd.hash = get_transaction_hash(tx);
|
||||
}
|
||||
else
|
||||
{
|
||||
txd.hash = get_pruned_transaction_hash(tx, tx.prunable_hash);
|
||||
}
|
||||
|
||||
// get tx public key from extra
|
||||
// this check if there are two public keys
|
||||
|
|
Loading…
Reference in a new issue