merge-script 8e1bd17252
Merge bitcoin/bitcoin#30544: rpc: fix maybe-uninitialized compile warning in getchaintxstats
2e86f2b2019ea0edbd89dd3fd13540c5bbfa104d rpc: fix maybe-uninitialized compile warning in getchaintxstats (Michael Dietz)

Pull request description:

  This resolves the compiler warning about potential uninitialized use of window_tx_count introduced in fa2dada.

  The warning:
  ```
  CXX      rpc/libbitcoin_node_a-blockchain.o
  rpc/blockchain.cpp: In function ‘getchaintxstats()::<lambda(const RPCHelpMan&, const JSONRPCRequest&)>’:
  rpc/blockchain.cpp:1742:38: warning: ‘*(std::_Optional_payload_base<unsigned int>::_Storage<unsigned int, true>*)((char*)&window_tx_count + offsetof(const std::optional<unsigned int>,std::optional<unsigned int>::<unnamed>.std::_Optional_base<unsigned int, true, true>::<unnamed>)).std::_Optional_payload_base<unsigned int>::_Storage<unsigned int, true>::_M_value’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   1742 |                 ret.pushKV("txrate", double(*window_tx_count) / nTimeDiff);
        |
  ```

ACKs for top commit:
  maflcko:
    lgtm ACK 2e86f2b2019ea0edbd89dd3fd13540c5bbfa104d
  theStack:
    ACK 2e86f2b2019ea0edbd89dd3fd13540c5bbfa104d
  tdb3:
    ACK 2e86f2b2019ea0edbd89dd3fd13540c5bbfa104d

Tree-SHA512: c087e8f1cd68dd8df734a8400d30a95abe57ebd56cd53aef4230e425b33a23aa55b3af42abfd162e3be8c937a4c27e56abb70a4fedb10e2df64d52d577e0f262
2024-08-02 10:50:34 +01:00
..
2024-06-13 11:20:49 +01:00
2024-05-20 16:48:19 +00:00
2024-06-18 18:47:51 +02:00
2024-06-18 18:47:51 +02:00
2024-07-08 11:12:01 +02:00