No description provided.
Report missing inputs in sendrawtransaction #5418
pull sipa wants to merge 2 commits into bitcoin:master from sipa:logmissing changing 3 files +78 −3-
sipa commented at 1:14 PM on December 3, 2014: member
- sipa force-pushed on Dec 3, 2014
-
gavinandresen commented at 2:40 PM on December 3, 2014: contributor
utACK
-
gmaxwell commented at 5:02 PM on December 3, 2014: contributor
ACK. I note that transactions with present inputs but missing signatures return -25 and message "", maybe that case should be covered to (I'm not sure what in particular inspired this particular improvement).
-
gmaxwell commented at 5:32 PM on December 3, 2014: contributor
Well kinda, it logs non-standard transaction inputs. :) it's okay, I didn't mean to start a tangent. I just wasn't sure what motivated this.
-
sipa commented at 5:33 PM on December 3, 2014: member
What motivated this: doing a
sendrawtransactionthat reported a -25 "" status, which is pretty unhelpful. Turns out, there were just missing inputs. - laanwj added the label RPC on Dec 4, 2014
-
in src/rpcrawtransaction.cpp:None in 178e796a38 outdated
747 | if(state.IsInvalid()) 748 | throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason())); 749 | - else 750 | + else { 751 | + if (fMissingInputs) { 752 | + throw JSONRPCError(RPC_TRANSACTION_REJECTED, "Missing inputs");
luke-jr commented at 12:55 PM on December 5, 2014:Shouldn't this be a RPC_TRANSACTION_ERROR?
sipa commented at 2:47 PM on December 8, 2014:No opinion.
laanwj commented at 3:41 PM on December 8, 2014:For RPC_TRANSACTION_REJECTED I'd prefer to keep to the
"%i: %s" % (code,reason)convention used above. So if it doesn't fit within that, RPC_TRANSACTION_ERROR may be better.
sipa commented at 10:38 PM on December 9, 2014:The current RPC_TRANSACTION_ERROR is for cases where there is no "IsInvalid", so that should really just be system errors.
laanwj commented at 6:53 AM on December 10, 2014:If you keep using RPC_TRANSACTION_REJECTED, can you add a reject code, to keep the format?
sipa commented at 2:17 PM on April 28, 2015:Changed to RPC_TRANSACTION_ERROR.
jonasschnelli referenced this in commit 4f0743db5d on Dec 29, 2014jonasschnelli commented at 7:18 PM on December 29, 2014: contributorTested. ACK. You might pull in my just written RPC test: https://github.com/jonasschnelli/bitcoin/commit/4f0743db5dafa86af21525f73578f948edddef6f
EagleTM commented at 3:58 PM on February 27, 2015: noneI've applied this patch to 0.10.0 for debugging purposes and it works well and detects lots of {u'message': u'Missing inputs', u'code': -26} on a public electrum server. I believe these were reported as code -25 before applying the patch, because this is the only error code I can find in logs which does not have a message. Moreover "Missing inputs" accounts for 70% of u'code': -26 messages and the overall rate has gone up, while code -25 decreased.
sipa force-pushed on Mar 1, 2015sipa referenced this in commit ca96f2c104 on Mar 1, 2015sipa commented at 11:02 AM on March 1, 2015: memberRebased and cherry-picked @jonasschnelli's RPC test.
laanwj commented at 8:10 AM on April 28, 2015: memberutACK, needs rebase though
Report missing inputs in sendrawtransaction de8e801d3fsipa force-pushed on Apr 28, 2015sipa referenced this in commit d58a6c58d8 on Apr 28, 2015sipa commented at 2:17 PM on April 28, 2015: memberRebased and nit addressed.
laanwj commented at 1:02 PM on May 1, 2015: memberFails travis, the test needs to be updated to use
generate:Running testscript rawtransactions.py... Initializing test directory /tmp/testtgQ972 JSONRPC error: Use the generate method instead of setgenerate on this network File "/home/travis/build/bitcoin/bitcoin/bitcoin-i686-pc-linux-gnu/qa/rpc-tests/test_framework.py", line 119, in main self.run_test() File "/home/travis/build/bitcoin/bitcoin/bitcoin-i686-pc-linux-gnu/qa/rpc-tests/rawtransactions.py", line 42, in run_test self.nodes[2].setgenerate(True, 1) File "/home/travis/build/bitcoin/bitcoin/bitcoin-i686-pc-linux-gnu/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py", line 126, in __call__ raise JSONRPCException(response['error']) Stopping nodes Cleaning upjonasschnelli referenced this in commit 70eccdf6e2 on May 1, 2015jonasschnelli commented at 1:08 PM on May 1, 2015: contributorRPC test for "#5418 Report missing inputs in sendrawtransaction" bba2216fc1sipa force-pushed on May 1, 2015sipa commented at 1:34 PM on May 1, 2015: memberUpdated.
laanwj merged this on May 4, 2015laanwj closed this on May 4, 2015laanwj referenced this in commit 16341cc15c on May 4, 2015promag referenced this in commit 02aae2f614 on May 5, 2015land-pack commented at 6:07 AM on July 23, 2018: noneIt's fixed?
MarcoFalke locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC
More mirrored repositories can be found on mirror.b10c.me