dash/src/rpc
Samuel Dobson f798da8e92 Merge #17584: wallet: replace raw pointer with const reference in AddrToPubKey
1a3a256d5e0443d19757c1f1fceb9c9ede17758a wallet: replace raw pointer with const reference in AddrToPubKey (Harris)

Pull request description:

  This PR replaces a redundant reference-to-pointer conversion in **addmultisigaddress** from *wallet/rpcwallet.cpp*. It also makes the API from *rpc/util.h* look more straightforward as **AddrToPubKey** now uses const references like other functions from there.

  I am not sure why there is a ref-to-ptr conversion in addmultisignatures, so I can only speculate that this is because of "historical reasons".

  The ref-to-ptr conversion happens here: https://github.com/bitcoin/bitcoin/blob/master/src/wallet/rpcwallet.cpp#L1001

  There, the address of LegacyScriptPubKeyMan& is given to AddrToPubKey.

  Later, in AddrToPubKey, it gets converted back to a reference, because GetKeyForDestination in rpc/util.cpp expects a const ref: https://github.com/bitcoin/bitcoin/blob/master/src/rpc/util.cpp#L140

  Regards,

ACKs for top commit:
  achow101:
    ACK 1a3a256d5e0443d19757c1f1fceb9c9ede17758a
  meshcollider:
    utACK 1a3a256d5e0443d19757c1f1fceb9c9ede17758a
  promag:
    Code review ACK 1a3a256d5e0443d19757c1f1fceb9c9ede17758a.
  hebasto:
    ACK 1a3a256d5e0443d19757c1f1fceb9c9ede17758a, I have not tested the code, but I have reviewed it and it looks OK, I agree it can be merged.

Tree-SHA512: 1a2b8ddab5694ef4c65fac69f011e38dd03a634e84a35857e13bd05ad99fe42af22ee0af6230865e3d2c725693512f3336acb055ede19c958424283e7a3856c4
2023-01-19 23:41:50 -06:00
..
blockchain.cpp Merge #19474: doc: Use precise permission flags where possible 2023-01-19 23:37:39 -06:00
blockchain.h refactor: create context for LLMQ subsystem within NodeContext, alias entangled globals (#5030) 2022-11-07 21:09:44 +03:00
client.cpp Merge #18495: rpc: Remove deprecated migration code 2023-01-01 20:16:57 -06:00
client.h Merge #12757: Clarify include guard naming convention 2020-07-19 00:42:54 -05:00
coinjoin.cpp merge bitcoin#20429: replace (sizeof(a)/sizeof(a[0])) with C++17 std::size 2022-11-01 00:28:53 -05:00
evo.cpp docs(rpc): added missing legacy rpc in help (#5161) 2023-01-19 23:34:24 -06:00
governance.cpp chore: run copyright_header.py update 2023-01-13 00:49:04 +03:00
masternode.cpp chore: run copyright_header.py update 2023-01-13 00:49:04 +03:00
mining.cpp Merge #18268: rpc: Remove redundant types from descriptions 2023-01-19 23:37:39 -06:00
mining.h refactor: remove the g_evoDb global; use NodeContext and locals (#5058) 2022-12-10 11:58:17 -06:00
misc.cpp Merge #18268: rpc: Remove redundant types from descriptions 2023-01-19 23:37:39 -06:00
net.cpp merge bitcoin#18134: Replace std::to_string with locale-independent alternative 2023-01-02 14:19:33 -06:00
protocol.h merge bitcoin#17407: Add reference to mempool in NodeContext 2022-04-20 00:22:36 +05:30
quorums.cpp feat(rpc): Added previousConsecutiveDKGFailures for rotation in quorum rpc (#5158) 2023-01-17 09:51:06 -06:00
rawtransaction_util.cpp merge bitcoin#16251: Improve signrawtransaction error reporting 2022-11-01 00:28:53 -05:00
rawtransaction_util.h Merge #17945: doc: Fix doxygen errors 2022-10-17 15:41:14 -05:00
rawtransaction.cpp Merge #19114 TxoutType C++11 scoped enum class 2023-01-19 23:37:39 -06:00
register.h refactor: PrivateSend -> CoinJoin + Move the tab (#4038) 2021-03-17 18:36:11 -04:00
request.cpp refactor(rpc): Mechanical/Manual RPC backports (#4734) 2022-05-12 15:29:17 -05:00
request.h refactor: replace util::Ref with CoreContext (std::variant) (#5055) 2022-10-22 12:18:03 -05:00
server.cpp merge bitcoin#22953: introduce single-separator split helper 2023-01-19 03:42:51 +00:00
server.h merge bitcoin#19056: Make gettxoutsetinfo/GetUTXOStats interruptible 2022-05-23 10:39:43 +05:30
util.cpp Merge #17584: wallet: replace raw pointer with const reference in AddrToPubKey 2023-01-19 23:41:50 -06:00
util.h Merge #17584: wallet: replace raw pointer with const reference in AddrToPubKey 2023-01-19 23:41:50 -06:00