Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/blockchain.cpp
Show First 20 Lines • Show All 2,359 Lines • ▼ Show 20 Lines | for (const auto &tx : block.vtx) { | ||||
"-txindex enabled"); | "-txindex enabled"); | ||||
} | } | ||||
Amount tx_total_in = Amount::zero(); | Amount tx_total_in = Amount::zero(); | ||||
for (const CTxIn &in : tx->vin) { | for (const CTxIn &in : tx->vin) { | ||||
CTransactionRef tx_in; | CTransactionRef tx_in; | ||||
BlockHash hashBlock; | BlockHash hashBlock; | ||||
if (!GetTransaction(in.prevout.GetTxId(), tx_in, params, | if (!GetTransaction(in.prevout.GetTxId(), tx_in, params, | ||||
hashBlock, false)) { | hashBlock)) { | ||||
throw JSONRPCError(RPC_INTERNAL_ERROR, | throw JSONRPCError(RPC_INTERNAL_ERROR, | ||||
std::string("Unexpected internal error " | std::string("Unexpected internal error " | ||||
"(tx index seems corrupt)")); | "(tx index seems corrupt)")); | ||||
} | } | ||||
CTxOut prevoutput = tx_in->vout[in.prevout.GetN()]; | CTxOut prevoutput = tx_in->vout[in.prevout.GetN()]; | ||||
tx_total_in += prevoutput.nValue; | tx_total_in += prevoutput.nValue; | ||||
▲ Show 20 Lines • Show All 445 Lines • Show Last 20 Lines |