Use of testmempoolaccept is not clear. testmempoolaccept yields unexpected error. #21069

issue Giszmo opened this issue on February 3, 2021
  1. Giszmo commented at 2:50 AM on February 3, 2021: none

    Expected behavior

    I would expect to get no error message when using testmempoolaccept on a raw transaction that decodes just fine using decoderawtransaction or at least a hint at what went wrong.

    Actual behavior

    getrawtransaction ea369e4d7cbb9f2a2fd58dff4d0923112a00674faa1b35bfd6424f89c94ab653
    0200000000010175c0e156c5c2545db4cf009a756a433677cce7d845f7626559329681379998950...
    decoderawtransaction "0200000000010175c0e156c5c2545db4cf009a756a433677cce7d845..."
    {
      "txid": "ea369e4d7cbb9f2a2fd58dff4d0923112a00674faa1b35bfd6424f89c94ab653",
      ...
    testmempoolaccept ["0200000000010175c0e156c5c2545db4cf009a756a433677cce7d845f..."]
    Error: Error parsing JSON: [0200000000010175c0e156c5c2545db4cf009a756a433677cce...
    

    To reproduce

    Probably always reproducible with confirmed transactions?

    System information

    bitcoin core 0.18.1 tgz, 0.20.0 snap and tgz

  2. Giszmo added the label Bug on Feb 3, 2021
  3. MarcoFalke commented at 7:05 AM on February 3, 2021: member

    What are the exact steps to reproduce? GUI/CLI?

  4. MarcoFalke removed the label Bug on Feb 3, 2021
  5. MarcoFalke added the label Questions and Help on Feb 3, 2021
  6. Giszmo commented at 12:04 PM on February 3, 2021: none

    The above command-result-command-result sequence is copied from a freshly installed 0.21.0 (sorry. said 0.20.0 above) -> Window -> Console but with the other versions I used the bitcoin-core.cli equivalent.

    Screenshot from 2021-02-03 09-03-18

  7. MarcoFalke commented at 12:49 PM on February 3, 2021: member

    It is not the best UX, but you have to type testmempoolaccept '["ffff"]'

  8. MarcoFalke closed this on Feb 3, 2021

  9. MarcoFalke added the label GUI on Feb 3, 2021
  10. MarcoFalke added the label RPC/REST/ZMQ on Feb 3, 2021
  11. Giszmo commented at 1:15 PM on February 3, 2021: none

    Thanks for clarifying. I now see how that makes sense. Maybe the help should be changed then??

    Screenshot from 2021-02-03 10-15-24

  12. MarcoFalke commented at 3:55 PM on February 3, 2021: member

    the oneline help only shows you the types, not the "encoding". Usually the encoding is done by a json library, but the gui (or the command line) doesn't have a json interpreter. You can find example calls for the command line (and gui) if you scroll down.

  13. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

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:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me