qt: increase console command max length #18993

pull 10xcryptodev wants to merge 1 commits into bitcoin:master from 10xcryptodevforks:202005-increase-console-command changing 1 files +1 −0
  1. 10xcryptodev commented at 4:58 AM on May 17, 2020: contributor

    fix #17618 Tested the examples #17618 (comment) and works

  2. fanquake added the label GUI on May 17, 2020
  3. MarcoFalke renamed this:
    qt: increase console command max lenght
    qt: increase console command max length
    on May 19, 2020
  4. tryphe commented at 3:19 AM on May 20, 2020: contributor

    Concept ACK

  5. in src/qt/rpcconsole.cpp:471 in ffded34820 outdated
     467 | @@ -468,6 +468,7 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
     468 |  
     469 |      // Install event filter for up and down arrow
     470 |      ui->lineEdit->installEventFilter(this);
     471 | +    ui->lineEdit->setMaxLength(INT_MAX);
    


    tryphe commented at 3:23 AM on May 20, 2020:

    Suggest std::numeric_limits<int32_t>::max() as it's the standard for size limits. I'm also not really sure a 2GB buffer makes sense here, but then again, what is a sane amount? Somewhere between 2^20 and 2^31 seems fine, but towards the latter seems a bit overboard.


    10xcryptodev commented at 3:46 AM on May 20, 2020:

    thanks @tryphe changed for the standard size limit. Yes, hard question about what number should be there. What rpc command should be the largest one? Maybe importblock with a full block? 16MB should be fine?


    tryphe commented at 4:02 AM on May 20, 2020:

    I think it's hard to answer that. If we make it just big enough for the biggest command we can come up with, someone will come up with a bigger one. I also don't see any way someone could accidentally paste 2GB of data in the textbox, which at worst would just make things a bit slow. I opt to wait for more comments to see if anyone objects.

  6. 10xcryptodev force-pushed on May 20, 2020
  7. laanwj commented at 11:10 AM on May 26, 2020: member

    Concept ACK. I'd prefer using a limit that is actually testable, though. 16MB sounds good.

    which at worst would just make things a bit slow.

    It could also crash the application with an out-of-memory error, or running out of virtual memory when compiled for 32-bit.

  8. MarcoFalke commented at 11:19 AM on May 26, 2020: member

    The largest p2p message type is a 4 MB block? With hex encoding that should be 8 MB. Wrapped again in json, that should be less than 16 MB.

    Btw doc is here: https://doc.qt.io/qt-5/qlineedit.html#maxLength-prop

  9. qt: increase console command max length fc6a637a01
  10. 10xcryptodev force-pushed on May 26, 2020
  11. 10xcryptodev commented at 9:57 PM on May 26, 2020: contributor

    @laanwj @MarcoFalke thanks! changed to 16MB and first tests ok

  12. MarcoFalke commented at 12:30 PM on May 28, 2020: member

    Approach ACK fc6a637a013daeb14b2f93652d7f494f3b8462aa

  13. luke-jr approved
  14. luke-jr commented at 8:49 PM on June 2, 2020: member

    utACK

  15. luke-jr referenced this in commit 90e3ca8da0 on Jun 9, 2020
  16. hebasto approved
  17. hebasto commented at 2:03 PM on July 9, 2020: member

    ACK fc6a637a013daeb14b2f93652d7f494f3b8462aa, I have reviewed the code and it looks OK, I agree it can be merged.

  18. fanquake merged this on Jul 9, 2020
  19. fanquake closed this on Jul 9, 2020

  20. sidhujag referenced this in commit 01c1227dea on Jul 9, 2020
  21. MarkLTZ referenced this in commit 8f9e154017 on Nov 7, 2020
  22. PastaPastaPasta referenced this in commit efc7836a07 on Jun 27, 2021
  23. PastaPastaPasta referenced this in commit f0ec1cd1fe on Jun 28, 2021
  24. PastaPastaPasta referenced this in commit 44ae4b6fd9 on Jun 29, 2021
  25. PastaPastaPasta referenced this in commit 3193ddc6ce on Jul 1, 2021
  26. PastaPastaPasta referenced this in commit 9251480fa8 on Jul 1, 2021
  27. PastaPastaPasta referenced this in commit 9a486ef89a on Jul 15, 2021
  28. PastaPastaPasta referenced this in commit 959a031bf8 on Jul 16, 2021
  29. Fabcien referenced this in commit 4e58da2388 on Aug 31, 2021
  30. DrahtBot locked this on Feb 15, 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-15 15:14 UTC

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