Somewhere there is a wallet to create that raw transaction.
IMO it should be checked on the sender side (the user of the REST API) if
the fee is too high and not trust the node with this.
E.g. someone could implement a web wallet that only relies on some nodes it
doesn’t control so you trust that node that it actually cares if you added
a too high fee or not. False security.
E.g. Nodes operated by miners have no incentive to tell the user of their
REST API the truth.
Am 28.10.2015 11:23 schrieb “MarcoFalke” notifications@github.com:
In src/rest.cpp
#6844 (review):
- else
- {
-
if (!DecodeHexTx(tx, strTx))
-
return RESTERR(req, HTTP_BAD_REQUEST, strprintf("TX decode failed %s",strTx));
- }
- uint256 hashTx = tx.GetHash();
- CCoinsViewCache &view = *pcoinsTip;
- const CCoins* existingCoins = view.AccessCoins(hashTx);
- bool fHaveMempool = mempool.exists(hashTx);
- bool fHaveChain = existingCoins && existingCoins->nHeight < 1000000000;
- if (!fHaveMempool && !fHaveChain) {
-
// push to local node and sync with wallets
-
CValidationState state;
-
bool fMissingInputs;
-
if (!AcceptToMemoryPool(mempool, state, tx, false, &fMissingInputs, false, false)) {
There is no wallet when you use raw transactions…
The rpc interface checks for high fee by default and you can disable it
with an additional argument. Any chance you could implement something like
that?
—
Reply to this email directly or view it on GitHub
https://github.com/bitcoin/bitcoin/pull/6844/files#r43237619.