Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/rawtransaction.cpp
Show First 20 Lines • Show All 1,107 Lines • ▼ Show 20 Lines | static UniValue sendrawtransaction(const Config &config, | ||||
CMutableTransaction mtx; | CMutableTransaction mtx; | ||||
if (!DecodeHexTx(mtx, request.params[0].get_str())) { | if (!DecodeHexTx(mtx, request.params[0].get_str())) { | ||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); | throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed"); | ||||
} | } | ||||
CTransactionRef tx(MakeTransactionRef(std::move(mtx))); | CTransactionRef tx(MakeTransactionRef(std::move(mtx))); | ||||
const uint256 &txid = tx->GetId(); | const uint256 &txid = tx->GetId(); | ||||
bool fLimitFree = false; | bool fLimitFree = true; | ||||
schancel: Well, locally generated transactions should be able to be mined by local nodes if that's what… | |||||
Amount nMaxRawTxFee = maxTxFee; | Amount nMaxRawTxFee = maxTxFee; | ||||
if (request.params.size() > 1 && request.params[1].get_bool()) { | if (request.params.size() > 1 && request.params[1].get_bool()) { | ||||
nMaxRawTxFee = Amount(0); | nMaxRawTxFee = Amount(0); | ||||
} | } | ||||
CCoinsViewCache &view = *pcoinsTip; | CCoinsViewCache &view = *pcoinsTip; | ||||
bool fHaveChain = false; | bool fHaveChain = false; | ||||
for (size_t o = 0; !fHaveChain && o < tx->vout.size(); o++) { | for (size_t o = 0; !fHaveChain && o < tx->vout.size(); o++) { | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |
Well, locally generated transactions should be able to be mined by local nodes if that's what the miner wants. Other miners may not relay the transaction though. The previous value does seem sane. I'm not sure why this is even configured.