mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
fix: signed outputs data checker does not work with coinbase txs
This commit is contained in:
parent
95e642fdc5
commit
fa168613ae
1 changed files with 25 additions and 17 deletions
12
src/page.h
12
src/page.h
|
@ -3219,7 +3219,7 @@ namespace xmreg
|
||||||
|
|
||||||
// if the output is RingCT, i.e., tx version is 2
|
// if the output is RingCT, i.e., tx version is 2
|
||||||
// need to decode its amount
|
// need to decode its amount
|
||||||
if (td.m_tx.version == 2)
|
if (td.is_rct())
|
||||||
{
|
{
|
||||||
// get tx associated with the given output
|
// get tx associated with the given output
|
||||||
transaction tx;
|
transaction tx;
|
||||||
|
@ -3236,6 +3236,11 @@ namespace xmreg
|
||||||
|
|
||||||
public_key tx_pub_key = xmreg::get_tx_pub_key_from_received_outs(tx);
|
public_key tx_pub_key = xmreg::get_tx_pub_key_from_received_outs(tx);
|
||||||
|
|
||||||
|
// cointbase txs have amounts in plain sight.
|
||||||
|
// so use amount from ringct, only for non-coinbase txs
|
||||||
|
if (!is_coinbase(tx))
|
||||||
|
{
|
||||||
|
|
||||||
bool r = decode_ringct(tx.rct_signatures,
|
bool r = decode_ringct(tx.rct_signatures,
|
||||||
tx_pub_key,
|
tx_pub_key,
|
||||||
prv_view_key,
|
prv_view_key,
|
||||||
|
@ -3254,7 +3259,10 @@ namespace xmreg
|
||||||
|
|
||||||
return mstch::render(full_page, context);
|
return mstch::render(full_page, context);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
} // if (!is_coinbase(tx))
|
||||||
|
|
||||||
|
} // if (td.is_rct())
|
||||||
|
|
||||||
uint64_t blk_timestamp = core_storage
|
uint64_t blk_timestamp = core_storage
|
||||||
->get_db().get_block_timestamp(td.m_block_height);
|
->get_db().get_block_timestamp(td.m_block_height);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue