Changeset View
Changeset View
Standalone View
Standalone View
src/rest.cpp
Show First 20 Lines • Show All 388 Lines • ▼ Show 20 Lines | static bool rest_tx(Config &config, HTTPRequest *req, | ||||
if (g_txindex) { | if (g_txindex) { | ||||
g_txindex->BlockUntilSyncedToCurrentChain(); | g_txindex->BlockUntilSyncedToCurrentChain(); | ||||
} | } | ||||
CTransactionRef tx; | CTransactionRef tx; | ||||
BlockHash hashBlock; | BlockHash hashBlock; | ||||
if (!GetTransaction(txid, tx, config.GetChainParams().GetConsensus(), | if (!GetTransaction(txid, tx, config.GetChainParams().GetConsensus(), | ||||
hashBlock, true)) { | hashBlock)) { | ||||
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found"); | return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found"); | ||||
} | } | ||||
switch (rf) { | switch (rf) { | ||||
case RetFormat::BINARY: { | case RetFormat::BINARY: { | ||||
CDataStream ssTx(SER_NETWORK, | CDataStream ssTx(SER_NETWORK, | ||||
PROTOCOL_VERSION | RPCSerializationFlags()); | PROTOCOL_VERSION | RPCSerializationFlags()); | ||||
ssTx << tx; | ssTx << tx; | ||||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |