cli: add -generate option #17700

pull brakmic wants to merge 10 commits into bitcoin:master from brakmic:resurrect-generate-method changing 3 files +117 −0
  1. brakmic commented at 9:14 am on December 9, 2019: contributor

    This PR is related to #16000 and should “bring back” the generate call.

    bitcoin-cli would get a new option -generate that mimics the original API.

    The allowed (optional) parameters are nblocks and maxtries. For example:

    • bitcoin-cli -generate

    • bitcoin-cli -generate 2

    • bitcoin-cli -generate 3 10000

  2. laanwj added the label RPC/REST/ZMQ on Dec 9, 2019
  3. laanwj commented at 9:35 am on December 9, 2019: member
    Concept ACK, seems useful for testing (vaguely related to #17314 as for improving -cli user experience)
  4. promag commented at 11:25 am on December 9, 2019: member
    Mind adding some test to test/functional/interface_bitcoin_cli.py?
  5. brakmic commented at 11:28 am on December 9, 2019: contributor

    Mind adding some test to test/functional/interface_bitcoin_cli.py?

    Yes, I spoke about it in the original posting, but I am not sure how to do it the correct way.

    But I’ll look into it.

  6. promag commented at 11:31 am on December 9, 2019: member
    @brakmic something like call bitcoin-cli -generate ... and check the response format and maybe also check the new tip against getblockchaininfo.
  7. in src/bitcoin-cli.cpp:519 in cf6a9d86b5 outdated
    514@@ -474,6 +515,48 @@ static int CommandLineRPC(int argc, char *argv[])
    515         if (gArgs.GetBoolArg("-getinfo", false)) {
    516             rh.reset(new GetinfoRequestHandler());
    517             method = "";
    518+        } else if (gArgs.GetBoolArg("-generate", false)) {
    519+            //-generate is special as it executes two RPC calls:
    520+            // 1) "getnewaddress" without any parameters, which returns a bech32 address
    521+            // 2) "generatetoaddress" with three params: numblocks, address and maxtries
    522+            // If no args are given the args-vector will be extended with DEFAULT_GENERATED_NBLOCKS
    523+            // and DEFAULT_GENERATED_MAXTRIES.
    


    MarcoFalke commented at 1:42 pm on December 9, 2019:
    Why is is needed to extend them with the defaults?

    brakmic commented at 1:47 pm on December 9, 2019:
    In generatetoaddress the first and third param are nblocks and maxtries. This is to make sure that all three args are there. But if there is a better way to handle it, please, give me a hint.

    MarcoFalke commented at 1:52 pm on December 9, 2019:
    If the user does not give a value, you can just pass nothing along as well (or null). The server then checks this and fills in the current default: https://github.com/bitcoin/bitcoin/blob/a739d207a39fc34c2e5adf4e14bfbb3a6288ede1/src/rpc/mining.cpp#L209

    brakmic commented at 1:53 pm on December 9, 2019:
    But I need it to construct the “fake” RPC call, because I also have to generate an address first. Then I go to create blocks. So I have to “save” all those params and their positions, so I can find them again.

    brakmic commented at 2:04 pm on December 9, 2019:
    But of course, I could simply put a NULL there, no problem. Let me check it how it’ll behave. :)

    brakmic commented at 2:07 pm on December 9, 2019:
    Hm, I’m now getting errors. No matter if I enter any args or none at all. Not sure if I should redo the logic? Is it really important that it doesn’t use any default args?

    MarcoFalke commented at 2:26 pm on December 9, 2019:

    So I tried this diff:

     0diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
     1index ef05c910d4..2fff98c05c 100644
     2--- a/src/bitcoin-cli.cpp
     3+++ b/src/bitcoin-cli.cpp
     4@@ -535,11 +535,11 @@ static int CommandLineRPC(int argc, char *argv[])
     5                 if (args.size() == 0) {
     6                     args.push_back(std::to_string(DEFAULT_GENERATED_NBLOCKS));
     7                     args.push_back(std::move(address));
     8-                    args.push_back(std::to_string(DEFAULT_GENERATED_MAXTRIES));
     9                 }
    10                 if (args.size() < 2) {
    11                     args.push_back(std::move(address));
    12-                    args.push_back(std::to_string(DEFAULT_GENERATED_MAXTRIES));
    13                 }
    14                 if (args.size() == 2) {
    15                     const std::string nblocks = args[0];
    

    And I get

    0$ ./src/bitcoin-cli -generate 1 
    1error: Error parsing JSON:bcrt1qyqfgcaddym58h6py4rrsz4g428gl5tmw84rt36
    

    Not sure why that is. I might take another look later.


    brakmic commented at 2:29 pm on December 9, 2019:
    This is surely because of the “ephemeral” calls in between. First, the address gets generated, then its JSON result flows into the second call, generatetoaddress. I am manipulating the args vector, which is being (re)used by the two APIs.

    MarcoFalke commented at 6:43 pm on December 9, 2019:

    Oh, I forgot to replace the if with else if. This works:

     0diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
     1index ef05c910d4..4179520cc1 100644
     2--- a/src/bitcoin-cli.cpp
     3+++ b/src/bitcoin-cli.cpp
     4@@ -229,7 +229,7 @@ class GetNewAddressRequestHandler: public BaseRequestHandler
     5 public:
     6    const int ID_GETNEWADDRESS = 0;
     7 
     8-   UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) override
     9+   UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& /* args */) override
    10     {
    11         const UniValue& request = JSONRPCRequestObj("getnewaddress", NullUniValue, ID_GETNEWADDRESS);
    12         return request;
    13@@ -248,11 +248,8 @@ public:
    14 
    15     UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) override
    16     {
    17-        std::vector<std::string> params = {};
    18-        params.push_back(args[0]);
    19-        params.push_back(args[1]);
    20-        params.push_back(args[2]);
    21-        UniValue paramsObj = RPCConvertValues("generatetoaddress", params);
    22+        UniValue paramsObj = RPCConvertValues("generatetoaddress", args);
    23         return JSONRPCRequestObj("generatetoaddress", paramsObj, ID_GENERATETOADDRESS);
    24     }
    25 
    26@@ -535,13 +532,11 @@ static int CommandLineRPC(int argc, char *argv[])
    27                 if (args.size() == 0) {
    28                     args.push_back(std::to_string(DEFAULT_GENERATED_NBLOCKS));
    29                     args.push_back(std::move(address));
    30-                    args.push_back(std::to_string(DEFAULT_GENERATED_MAXTRIES));
    31                 }
    32-                if (args.size() < 2) {
    33+                else if (args.size() < 2) {
    34                     args.push_back(std::move(address));
    35-                    args.push_back(std::to_string(DEFAULT_GENERATED_MAXTRIES));
    36                 }
    37-                if (args.size() == 2) {
    38+                else if (args.size() == 2) {
    39                     const std::string nblocks = args[0];
    40                     const std::string maxtries = args[1];
    41                     args.clear();
    

    brakmic commented at 6:45 pm on December 9, 2019:
    Great! Many thanks!
  8. brakmic commented at 1:57 pm on December 9, 2019: contributor

    @brakmic something like call bitcoin-cli -generate ... and check the response format and maybe also check the new tip against getblockchaininfo.

    I’ve added tests in test/functional/rpc_generate.py However, I am not sure if it should be prefixed with “rpc”, because under the hood it uses CLI to mimic the old generate API. So maybe it should rather be called “cli_generate” or something along the line.

    The current test checks for:

    • block generation (default, with or without args nblocks & maxtries)
    • errors (when args invalid)
  9. cli: add -generate option 99011af50c
  10. in src/bitcoin-cli.cpp:52 in 99011af50c outdated
    48@@ -47,6 +49,7 @@ static void SetupCliArgs()
    49     gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    50     gArgs.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    51     gArgs.AddArg("-getinfo", "Get general information from the remote server. Note that unlike server-side RPC calls, the results of -getinfo is the result of multiple non-atomic requests. Some entries in the result may represent results from different states (e.g. wallet balance may be as of a different block from the chain state reported)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    52+    gArgs.AddArg("-generate=[nblocks] [maxtries]", strprintf("Generate blocks immediately (default nblocks: %s, maxtries: %s)", DEFAULT_GENERATED_NBLOCKS, DEFAULT_GENERATED_MAXTRIES), ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
    


    MarcoFalke commented at 6:57 pm on December 9, 2019:
    • Is the equal sign wanted in -generate=...?
    • I think it is fine to just mention that the default for maxtries is given by the default of the generatetoaddress::maxtries

    brakmic commented at 7:02 pm on December 9, 2019:
    I wasn’t sure how to properly inform the user about the optional nature of these two flags. There is no requirement to keep the equal sign. I’ll adapt this part to look like other commands.

    brakmic commented at 7:09 pm on December 9, 2019:
    Hm, I was wrong, the equal sign is needed. My tests are failing if I have no equal sign there.

    brakmic commented at 7:20 pm on December 9, 2019:
    But I will remove the [] around the params. Also, the call works with =, so “generate=1” returns a block.

    brakmic commented at 7:40 pm on December 9, 2019:
    But it doesn’t process the arguments properly. So, if I put generate=10 it still generates only one block. And if I call it with generate=1 1000 it tries to generate 1000 blocks. This definitely is not good, so I need a way to get rid of = sign in the command description.

    brakmic commented at 7:52 pm on December 9, 2019:
    The next option, imo, is to extend the rpc/client.cpp with param names so they can be picked up by RPCConvertNamedValues in the handler functions. Will try it out.

    brakmic commented at 8:11 pm on December 9, 2019:

    Ok, the simplest solution is the best one. :)

    I have removed the whole stuff =nblocks maxtries and only left -generate in command help info.

  11. in src/bitcoin-cli.cpp:519 in 99011af50c outdated
    510@@ -474,6 +511,46 @@ static int CommandLineRPC(int argc, char *argv[])
    511         if (gArgs.GetBoolArg("-getinfo", false)) {
    512             rh.reset(new GetinfoRequestHandler());
    513             method = "";
    514+        } else if (gArgs.GetBoolArg("-generate", false)) {
    515+            //-generate is special as it executes two RPC calls:
    516+            // 1) "getnewaddress" without any parameters, which returns a bech32 address
    517+            // 2) "generatetoaddress" with three params: numblocks, address and maxtries
    518+            // If no args are given the args-vector will be extended with DEFAULT_GENERATED_NBLOCKS
    519+            // and DEFAULT_GENERATED_MAXTRIES.
    


    MarcoFalke commented at 6:57 pm on December 9, 2019:
    should be removed?

    brakmic commented at 7:03 pm on December 9, 2019:
    Yes, it should go now. Will adapt the code. Thanks!
  12. in src/bitcoin-cli.cpp:516 in 99011af50c outdated
    510@@ -474,6 +511,46 @@ static int CommandLineRPC(int argc, char *argv[])
    511         if (gArgs.GetBoolArg("-getinfo", false)) {
    512             rh.reset(new GetinfoRequestHandler());
    513             method = "";
    514+        } else if (gArgs.GetBoolArg("-generate", false)) {
    515+            //-generate is special as it executes two RPC calls:
    516+            // 1) "getnewaddress" without any parameters, which returns a bech32 address
    


    MarcoFalke commented at 6:58 pm on December 9, 2019:
    0            // 1) "getnewaddress" without any parameters
    

    This is the default, but can be modified in the config settings


    brakmic commented at 7:04 pm on December 9, 2019:
    Yes, of course :)
  13. in src/bitcoin-cli.cpp:543 in 99011af50c outdated
    538+                else if (args.size() < 2) {
    539+                    args.push_back(std::move(address));
    540+                }
    541+                else if (args.size() == 2) {
    542+                    const std::string nblocks = args[0];
    543+                    const std::string maxtries = args[1];
    


    MarcoFalke commented at 7:00 pm on December 9, 2019:
    style-nit: I prefer .at(0) and .at(1). Feel free to ignore.

    brakmic commented at 7:04 pm on December 9, 2019:
    at makes more sense, in every way. Will adapt.
  14. MarcoFalke approved
  15. MarcoFalke commented at 7:01 pm on December 9, 2019: member
    ACK
  16. Update src/bitcoin-cli.cpp
    Co-Authored-By: MarcoFalke <falke.marco@gmail.com>
    a9faef54e8
  17. cleanups 70543e984f
  18. adapt command help-info 7081ab273e
  19. Update src/bitcoin-cli.cpp
    Co-Authored-By: MarcoFalke <falke.marco@gmail.com>
    03de7ae545
  20. in src/bitcoin-cli.cpp:52 in 7081ab273e outdated
    48@@ -47,6 +49,7 @@ static void SetupCliArgs()
    49     gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    50     gArgs.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    51     gArgs.AddArg("-getinfo", "Get general information from the remote server. Note that unlike server-side RPC calls, the results of -getinfo is the result of multiple non-atomic requests. Some entries in the result may represent results from different states (e.g. wallet balance may be as of a different block from the chain state reported)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    52+    gArgs.AddArg("-generate", strprintf("Generate blocks immediately (default nblocks: %s, maxtries: %s)", DEFAULT_GENERATED_NBLOCKS, DEFAULT_GENERATED_MAXTRIES), ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
    


    MarcoFalke commented at 8:29 pm on December 9, 2019:
    0    gArgs.AddArg("-generate", strprintf("[nblocks] [maxtries] Generate blocks immediately (default nblocks: %s, maxtries: Same default as the generatetoaddress RPC)", DEFAULT_GENERATED_NBLOCKS), ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
    

    brakmic commented at 8:30 pm on December 9, 2019:
    Many thanks!
  21. remove redundant DEFAULT_GENERATED_MAXTRIES 781fa338d3
  22. in src/bitcoin-cli.cpp:37 in 03de7ae545 outdated
    32@@ -33,6 +33,8 @@ const std::function<std::string(const char*)> G_TRANSLATION_FUN = nullptr;
    33 static const char DEFAULT_RPCCONNECT[] = "127.0.0.1";
    34 static const int DEFAULT_HTTP_CLIENT_TIMEOUT=900;
    35 static const bool DEFAULT_NAMED=false;
    36+static const int DEFAULT_GENERATED_NBLOCKS=1;
    37+static const int DEFAULT_GENERATED_MAXTRIES=100000;
    


    MarcoFalke commented at 8:32 pm on December 9, 2019:
    This is now unused, right?

    brakmic commented at 8:33 pm on December 9, 2019:
    DEFAULT_GENERATED_MAXTRIES is unused. The other is still needed for args in CommandLineRPC

    brakmic commented at 8:34 pm on December 9, 2019:
    Maybe I messed it up and forgot to remove it in CommandLineRPC too?

    brakmic commented at 8:35 pm on December 9, 2019:
    And DEFAULT_GENERATED_NBLOCKS is still used in help info.

    brakmic commented at 8:37 pm on December 9, 2019:
    Have tested it without DEFAULT_GENERATED_NBLOCKS in CommandLIneRPC and it failed when used generate without any params.
  23. jonasschnelli commented at 6:02 am on December 16, 2019: contributor
    Nice. Although I would prefer something that is also possible through the GUI console (maybe server side) instead of in both clients?
  24. laanwj commented at 10:20 am on December 16, 2019: member

    Although I would prefer something that is also possible through the GUI console (maybe server side) instead of in both clients?

    I’m definitely opposed to adding more mining functionality back server-side.

    But I guess in the longer term we could have a new library that’s shared between the GUI console and cli, for these kind of features.

    I think GUI is out of scope here though.

  25. adamjonas commented at 5:24 pm on December 16, 2019: member

    Concept ACK. I did a little playing around with this and had two main pieces of feedback:

    1. One of the reasons I’m such a big supporter for bringing back generate is because many of the historical tutorials were broken when it was removed (for example https://btcinformation.org/en/developer-examples#regtest-mode). Unfortunately, this isn’t corrected here. I’m aware that adding the dash is based on the -getinfo precedent, but at the very least, catching generate client side and providing user feedback, even if it refers to adding the dash or gives fuller instructions on how to use generatetoaddress, would reduce a lot of head scratching for first-time users.

    2. The JSON that’s returned could be improved.

    I think returning a blockhash string similar to generatetoaddress would be ideal. But if we are going to include key/values, I’d argue that both the blockhashes and the newly generated address should be displayed. This would educate the user as to what is going on under the hood and allow testers to access the address that would be otherwise lost. If we decide to omit the addresses, we can just return the blockhashes in an array like generatetoaddress rather than putting it a level deep inside of “result” (“result” should probably be renamed to “blockhashes”). But regardless, removing the “error” field in the absence of errors and taking out the “id” field would clean it up a lot.

  26. changed JSON result structure, +updated tests 1b815f34d4
  27. brakmic commented at 0:24 am on December 17, 2019: contributor
    1. The JSON that’s returned could be improved.

    I’ve changed the structure of JSON result and it now looks like this:

    0./src/bitcoin-cli -regtest -generate 3
    1{
    2  "address": "bcrt1qxwysj6war3v4jf6kcderstxsecq534umcalefc",
    3  "blocks": [
    4    "6f78253c94c0e5b180ae7002c366811a9f70a32b70fc17a81e42fd69d351ecf9",
    5    "46f1b2790fe2e973fe67531c1acb7f29298005a5107b80cd56d510050599316b",
    6    "34d3c018be1455fcfd40a07ba5e55f245af9515e9e9f50116f4948399378ff59"
    7  ]
    8}
    
  28. in src/bitcoin-cli.cpp:51 in 1b815f34d4 outdated
    47@@ -47,6 +48,7 @@ static void SetupCliArgs()
    48     gArgs.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    49     gArgs.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    50     gArgs.AddArg("-getinfo", "Get general information from the remote server. Note that unlike server-side RPC calls, the results of -getinfo is the result of multiple non-atomic requests. Some entries in the result may represent results from different states (e.g. wallet balance may be as of a different block from the chain state reported)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
    51+    gArgs.AddArg("-generate", strprintf("[nblocks] [maxtries] Generate blocks immediately (default nblocks: %s, maxtries: Same default as the generatetoaddress RPC)", DEFAULT_GENERATED_NBLOCKS), ArgsManager::ALLOW_ANY, OptionsCategory::BLOCK_CREATION);
    


    jonatack commented at 7:23 pm on January 18, 2020:
    sort, should be above -getinfo?

    brakmic commented at 7:44 pm on January 18, 2020:
    Ok, I can change it. However, as there are already a few other commits that I didn’t squash because of some reasons I will keep this change and a few others you mentioned below in a separate commit. I can then squash them all together later.
  29. in test/functional/rpc_generate.py:14 in 1b815f34d4 outdated
     9+
    10+
    11+class GenerateRpcTest(BitcoinTestFramework):
    12+    def set_test_params(self):
    13+        self.num_nodes = 1
    14+        self.setup_clean_chain = True
    


    jonatack commented at 7:28 pm on January 18, 2020:
    Do you need a clean chain for the test or can it use the cached data?
  30. in test/functional/rpc_generate.py:20 in 1b815f34d4 outdated
    15+
    16+    def skip_test_if_missing_module(self):
    17+        self.skip_if_no_wallet()
    18+
    19+    def run_test(self):
    20+        self.generate_blocks()
    


    jonatack commented at 7:33 pm on January 18, 2020:
    Could place the tests in run_test() directly since they are all together anyway.

    jonatack commented at 7:33 pm on January 18, 2020:
    Could add a docstring and/or logging.
  31. jonatack commented at 7:34 pm on January 18, 2020: member
    Concept ACK
  32. put -generate before -getinfo in bitcoin-cli.cpp 37321afc4e
  33. don't ask for clean chain in test 200c0ba66a
  34. execute tests in run_test directly ca02d36586
  35. emilengler commented at 6:31 pm on January 29, 2020: contributor
    Concept NACK If this option is for testing, why not make a simple shell script locally to do that? What’s the advantage of having this?
  36. brakmic commented at 6:33 pm on January 29, 2020: contributor

    Concept NACK If this option is for testing, why not make a simple shell script locally to do that? What’s the advantage of having this?

    Please, check the original discussion which this PR is based on: https://github.com/bitcoin/bitcoin/issues/16000

  37. emilengler commented at 6:36 pm on January 29, 2020: contributor
    @brakmic I flew over the old discussion but I saw that the old point wasn’t pointed out somewhere. Maybe I oversaw could you point me to thing you think I may missed?
  38. brakmic commented at 6:42 pm on January 29, 2020: contributor

    @brakmic I flew over the old discussion but I saw that the old point wasn’t pointed out somewhere. Maybe I oversaw could you point me to thing you think I may missed?

    Old point? Not sure what you mean with it.

    All in all, the reason for “resurrecting” this retired API call is to create something that behaves similarly to -getinfo. As we all know, In the past getinfo was one of the RPC calls that later got removed (and subsequently reintroduced as a CLI-only -getinfo option). Now, the same should happen with -generate which is not an RPC call but a purely CLI-thing.

    In a way, it already functions like a shell script would do (and could also itself be reused in other shell scripts too, in my opinion).

    I hope my explanation helps you further.

  39. laanwj added the label Feature on Mar 19, 2020
  40. DrahtBot commented at 1:54 am on April 13, 2020: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #18594 (cli: display multiwallet balances in -getinfo by jonatack)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  41. in src/bitcoin-cli.cpp:264 in ca02d36586
    259+        res.pushKV("blocks", result.get_obj()["result"]);
    260+        return JSONRPCReplyObj(res, NullUniValue, 1);
    261+    }
    262+protected:
    263+    std::string addr;
    264+};
    


    jonatack commented at 6:45 pm on April 13, 2020:
    I think you don’t need to do any of these 40 lines of setup as you’re not batching. You can use the existing DefaultRequestHandler and put the 2 pushKV lines in your -generate code section below. See 06a1bf6c1e1de3e219d2f8eebe187c1ca2962e9d for a semi-related example.

    brakmic commented at 10:09 pm on April 13, 2020:

    Many thanks. A good idea. However, my code is based on a pretty “old” version that differs greatly from https://github.com/bitcoin/bitcoin/commit/06a1bf6c1e1de3e219d2f8eebe187c1ca2962e9d

    Maybe before changing all that, I should rebase this code and try to re-implement it again.


    jonatack commented at 10:18 pm on April 13, 2020:
    ISTM the only (or main) change between the example in 06a1bf6c1e1de3e219d2f8eebe187c1ca2962e9d and your code is that you would use CallRPC instead of ConnectAndCallRPC (with the same arguments, just renaming).

    brakmic commented at 10:20 pm on April 13, 2020:
    Ok, then let’s see how far this goes.

    jonatack commented at 10:21 pm on April 13, 2020:

    E.g.

    0CallRPC(rh.get(), "getnewaddress", args);
    1CallRPC(rh.get(), "generatetoaddress", args);
    

    etc.


    brakmic commented at 11:40 pm on April 13, 2020:
    Sadly, it wouldn’t make much sense to change it, because CallRPC isn’t exactly the same as ConnectAndCallRPC. In my code there is a “default” CallRPC, which collides with my special “-generate” command that needs two of such calls. So, either I modify this implicit RPCCall thus making it even more complex, or I leave it as it is. I don’t remember exactly, because it’s been three months since I’ve worked on this code, but I wrote all that “ceremonial” stuff (extra request handlers etc.) because I didn’t want to introduce even more if-then-else to find my way around the already complex structure there. But now, as the ConnectAndCallRPC has actually moved away this “default” CallRPC I could work on that basis. Hence my question, should I rebase the code.
  42. brakmic closed this on May 10, 2020

  43. jonatack commented at 8:20 pm on May 28, 2020: member
    Hi @brakmic, would you have any objection if I relaunch and update this, building on some of your commits?
  44. brakmic commented at 8:22 pm on May 28, 2020: contributor

    Hi @brakmic, would you have any objection if I relaunch and update this, building on some of your commits?

    No problem. Take anything that could be of use to you.

  45. jonatack commented at 12:39 pm on June 1, 2020: member
    Thanks @brakmic! Continued the work in #19133.
  46. meshcollider referenced this in commit 47a30ef0c6 on Jun 21, 2020
  47. sidhujag referenced this in commit 4868422bc1 on Jul 7, 2020
  48. laanwj referenced this in commit dabab06a1a on Aug 14, 2020
  49. sidhujag referenced this in commit ff1cb84f45 on Aug 16, 2020
  50. 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: 2024-07-03 13:13 UTC

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