No description provided.
Allow getblocktemlate for not connected regtest node #9116
pull ondrejsika wants to merge 1 commits into bitcoin:master from ondrejsika:master changing 1 files +2 −1-
ondrejsika commented at 12:21 PM on November 9, 2016: none
-
Allow getblocktemlate for not connected regtest node 849f6ea343
- fanquake added the label RPC/REST/ZMQ on Nov 9, 2016
-
laanwj commented at 4:05 PM on November 9, 2016: member
This has come up before in a discussion recently.
However, instead of a special-case for regtest I think we should add a command line option to ignore the
getblocktemplatepre-checks, both this one and the IsInitialBlockDownload - this makes it more general, and avoids switching on the name of the network, which is considered a bad thing. -
paveljanik commented at 8:41 AM on November 10, 2016: contributor
Shouldn't regtest be "always connected"?
-
MarcoFalke commented at 9:54 AM on November 10, 2016: member
Shouldn't regtest be "always connected"?
Probably not, it depends on your use case. So I agree with @laanwj and we should keep the special cases of regtest to a minimum.
-
in src/rpc/mining.cpp:None in 849f6ea343
464 | @@ -465,7 +465,8 @@ UniValue getblocktemplate(const JSONRPCRequest& request) 465 | if(!g_connman) 466 | throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled"); 467 | 468 | - if (g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0) 469 | + // Allow getblocktemlate for not connected regtest node 470 | + if (Params().NetworkIDString() != "regtest" && g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL) == 0)
luke-jr commented at 6:19 AM on December 2, 2016:Do the regtest comparison second so it can't incur any penalty on normal operation.
fanquake commented at 1:34 PM on January 12, 2017: memberClosing this due to inactivity. @ondrejsika if this is something your still working on/would like merged could you address the feedback here.
fanquake closed this on Jan 12, 2017MarcoFalke locked this on Sep 8, 2021Labels
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