Make sure we only mine via the first wallet #10649

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2017/06/wallet_generate changing 1 files +9 −0
  1. jonasschnelli commented at 6:59 am on June 22, 2017: contributor

    If one used generate while running with multiple wallets -wallet=file1.dat wallet=file2.dat the wallet used for the coinbase script is pretty undefined (or lets say weak defined, it’s probably always the last one).

    This PR is a quick fix (should be okay for the internal miner) to ensure we always use the first wallet for generate | setgenerate.

    Ideally, someone works on passing the endpoint (coming soon) down to the signal listener.

  2. Make sure we only mine via the first wallet b43a646b0d
  3. jonasschnelli added the label Mining on Jun 22, 2017
  4. jonasschnelli added the label Wallet on Jun 22, 2017
  5. laanwj commented at 1:23 pm on June 22, 2017: member
    I proposed this before but not sure what the outcome of the discussion was - what about making generate a wallet method? This means Instead of using the first wallet, could simply use GetWalletForJSONRPCRequest(request). (edit: apparently I proposed this in #7965)
  6. ryanofsky commented at 12:21 pm on June 23, 2017: member

    Tested ACK b43a646b0de0c147d935605bf7e57f7211f631c9. This is a good fix for current unpredictable behavior. It’s hard to write python tests that depend on multiwallet without this.

    I proposed this before but not sure what the outcome of the discussion was - what about making generate a wallet method?

    Seems like a good idea. Would you lose the ability to generate blocks when wallet is disabled (if we even have this ability)?

  7. laanwj commented at 9:10 am on June 24, 2017: member

    Seems like a good idea. Would you lose the ability to generate blocks when wallet is disabled (if we even have this ability)?

    No-

    • generatetoaddress will work without wallet
    • generate needs wallet

    See #10683.

  8. laanwj referenced this in commit a8885523ea on Jun 27, 2017
  9. laanwj referenced this in commit 1e09f2c35b on Jun 27, 2017
  10. laanwj referenced this in commit 8c410a8fbb on Jun 27, 2017
  11. jnewbery commented at 4:12 pm on June 27, 2017: member
    I think #10683 is a better solution here.
  12. laanwj commented at 6:25 am on June 28, 2017: member
    Closing in favor of #10683
  13. laanwj closed this on Jun 28, 2017

  14. laanwj referenced this in commit df7e2f057b on Jun 29, 2017
  15. jnewbery referenced this in commit b3d47d8afe on Jul 4, 2017
  16. jnewbery referenced this in commit 62c6084a44 on Jul 7, 2017
  17. HashUnlimited referenced this in commit d1262b436e on Mar 6, 2018
  18. attilaaf referenced this in commit 2aab269666 on May 25, 2019
  19. MarcoFalke locked this on Sep 8, 2021

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-11-21 09:12 UTC

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