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; | ||||
deadalnix: It's very unclear what this is and what this do. However, it seems like it is a change in the… | |||||
sickpigUnsubmitted Not Done Inline Actionssendrawtransaction is used to submit locally generated transactions to the mempool during unit test. Having fLimitFree set to false means that the limiterfreerelay constraint was not applied to txns submitted via sendrawtransaction. It seems a bug to me to have a different policy for the acceptance of locally generate txns and remotely generated ones (received via another peer) sickpig: `sendrawtransaction` is used to submit locally generated transactions to the mempool during… | |||||
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 |
It's very unclear what this is and what this do. However, it seems like it is a change in the behavior of this RPC call, and would deserve a diff of its own.