fix #17618 Tested the examples #17618 (comment) and works
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-
10xcryptodev commented at 4:58 AM on May 17, 2020: contributor
- fanquake added the label GUI on May 17, 2020
- MarcoFalke renamed this:
qt: increase console command max lenght
qt: increase console command max length
on May 19, 2020 -
tryphe commented at 3:19 AM on May 20, 2020: contributor
Concept ACK
-
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.
10xcryptodev force-pushed on May 20, 2020laanwj commented at 11:10 AM on May 26, 2020: memberConcept 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.
MarcoFalke commented at 11:19 AM on May 26, 2020: memberThe 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
qt: increase console command max length fc6a637a0110xcryptodev force-pushed on May 26, 202010xcryptodev commented at 9:57 PM on May 26, 2020: contributor@laanwj @MarcoFalke thanks! changed to 16MB and first tests ok
MarcoFalke commented at 12:30 PM on May 28, 2020: memberApproach ACK fc6a637a013daeb14b2f93652d7f494f3b8462aa
luke-jr approvedluke-jr commented at 8:49 PM on June 2, 2020: memberutACK
luke-jr referenced this in commit 90e3ca8da0 on Jun 9, 2020hebasto approvedhebasto commented at 2:03 PM on July 9, 2020: memberACK fc6a637a013daeb14b2f93652d7f494f3b8462aa, I have reviewed the code and it looks OK, I agree it can be merged.
fanquake merged this on Jul 9, 2020fanquake closed this on Jul 9, 2020sidhujag referenced this in commit 01c1227dea on Jul 9, 2020MarkLTZ referenced this in commit 8f9e154017 on Nov 7, 2020PastaPastaPasta referenced this in commit efc7836a07 on Jun 27, 2021PastaPastaPasta referenced this in commit f0ec1cd1fe on Jun 28, 2021PastaPastaPasta referenced this in commit 44ae4b6fd9 on Jun 29, 2021PastaPastaPasta referenced this in commit 3193ddc6ce on Jul 1, 2021PastaPastaPasta referenced this in commit 9251480fa8 on Jul 1, 2021PastaPastaPasta referenced this in commit 9a486ef89a on Jul 15, 2021PastaPastaPasta referenced this in commit 959a031bf8 on Jul 16, 2021Fabcien referenced this in commit 4e58da2388 on Aug 31, 2021DrahtBot locked this on Feb 15, 2022
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
More mirrored repositories can be found on mirror.b10c.me