W. J. van der Laan
64059b78f5
Merge bitcoin/bitcoin#21943 : Dedup and RAII-fy the creation of a copy of CConnman::vNodes
...
f52b6b2d9f net: split CConnman::SocketHandler() (Vasil Dimov)
c7eb19ec83 style: remove unnecessary braces (Vasil Dimov)
664ac22c53 net: keep reference to each node during socket wait (Vasil Dimov)
75e8bf55f5 net: dedup and RAII-fy the creation of a copy of CConnman::vNodes (Vasil Dimov)
Pull request description:
_This is a piece of https://github.com/bitcoin/bitcoin/pull/21878 , chopped off to ease review._
The following pattern was duplicated in CConnman:
```cpp
lock
create a copy of vNodes, add a reference to each one
unlock
... use the copy ...
lock
release each node from the copy
unlock
```
Put that code in a RAII helper that reduces it to:
```cpp
create snapshot "snap"
... use the copy ...
// release happens when "snap" goes out of scope
ACKs for top commit:
jonatack:
ACK f52b6b2d9f changes since last review are reordered commits, removing an unneeded local variable, and code formatting and documentation improvements
LarryRuane:
code review ACK f52b6b2d9f
promag:
Code review ACK f52b6b2d9f , only format changes and comment tweaks since last review.
Tree-SHA512: 5ead7b4c641ebe5b215e7baeb7bc0cdab2a588b2871d9a343a1d518535c55c0353d4e46de663f41513cdcc79262938ccea3232f6d5166570fc2230286c985f68
2021-11-24 17:44:07 +01:00
..
2021-11-17 09:25:14 +01:00
2021-10-05 11:10:37 +02:00
2021-09-10 11:18:58 +08:00
2021-11-16 09:56:45 +01:00
2021-09-29 14:10:29 +02:00
2021-10-20 11:54:03 +05:30
2021-10-12 14:36:51 +13:00
2021-10-26 15:54:52 +01:00
2021-11-16 08:42:21 +01:00
2021-10-05 11:10:47 -04:00
2021-10-05 17:28:02 +02:00
2021-10-21 09:36:07 +08:00
2021-11-22 15:11:58 +01:00
2021-11-16 09:56:45 +01:00
2021-10-22 12:32:16 +02:00
2021-11-21 23:46:21 +02:00
2021-11-22 13:26:01 +01:00
2021-11-22 10:01:17 +01:00
2021-07-14 14:43:45 -07:00
2021-10-20 18:36:40 -04:00
2021-11-24 11:04:37 +01:00
2021-10-11 20:45:56 +08:00
2021-11-24 11:04:37 +01:00
2021-11-22 10:01:17 +01:00
2021-11-16 09:56:45 +01:00
2021-11-12 11:46:34 +01:00
2021-09-07 09:11:10 +02:00
2021-10-05 11:10:47 -04:00
2021-09-28 22:21:10 -04:00
2021-11-10 17:38:45 +01:00
2021-11-10 17:38:45 +01:00
2021-11-09 17:09:50 +00:00
2020-12-31 09:45:41 +01:00
2021-07-30 11:21:51 +02:00
2021-11-16 09:56:45 +01:00
2021-01-31 17:35:16 +01:00
2020-12-31 09:45:41 +01:00
2021-10-12 12:03:14 +13:00
2021-10-12 12:03:14 +13:00
2021-08-17 16:54:47 +08:00
2021-11-11 13:14:01 +01:00
2021-08-17 16:54:47 +08:00
2021-10-12 12:45:55 +02:00
2021-08-17 16:54:47 +08:00
2021-06-18 20:10:07 +02:00
2021-08-17 16:54:47 +08:00
2021-11-01 11:25:42 +08:00
2021-08-17 16:54:47 +08:00
2021-10-01 13:51:10 +00:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2021-10-20 15:52:08 +02:00
2021-10-14 17:49:52 +05:30
2021-07-09 11:19:36 +02:00
2021-10-25 10:44:17 -04:00
2020-12-31 09:45:41 +01:00
2021-07-30 11:03:44 +02:00
2021-10-01 13:51:10 +00:00
2021-08-16 16:04:47 +08:00
2021-08-16 16:04:47 +08:00
2021-06-17 09:47:08 -04:00
2021-06-17 09:47:08 -04:00
2021-03-01 17:36:16 +01:00
2021-05-04 06:53:32 +02:00
2021-10-05 10:42:34 +02:00
2021-10-11 09:17:28 +02:00
2021-10-05 10:42:34 +02:00
2021-01-04 12:23:16 +08:00
2021-11-15 12:08:49 -05:00
2021-02-01 15:17:28 +01:00
2021-06-30 08:19:12 +10:00
2021-06-30 08:19:12 +10:00
2021-08-02 23:48:32 +10:00
2021-07-01 20:20:52 +02:00
2021-09-30 12:06:27 +13:00
2021-08-24 11:30:09 +02:00
2021-06-16 10:48:58 +02:00
2021-10-05 11:10:47 -04:00
2021-10-22 04:03:45 +03:00
2021-11-15 12:08:49 -05:00
2021-10-05 23:53:33 +02:00
2021-04-23 11:35:15 -07:00
2021-09-02 13:17:46 +08:00
2021-11-16 09:56:45 +01:00
2021-10-04 22:45:43 +02:00
2021-10-05 11:10:47 -04:00
2021-11-16 09:56:45 +01:00
2021-11-24 10:49:13 +01:00
2021-07-12 21:46:59 +08:00
2021-10-12 12:03:14 +13:00
2021-10-12 12:03:14 +13:00
2021-11-12 12:04:20 -05:00
2021-11-12 12:04:20 -05:00
2021-10-11 21:45:49 +10:00
2021-10-11 21:45:49 +10:00
2021-11-16 16:09:25 +08:00
2021-07-08 12:28:23 +02:00
2021-09-24 15:40:04 +08:00
2021-10-15 01:02:45 +00:00
2021-10-21 09:37:30 +08:00
2020-10-27 19:40:44 +01:00
2021-11-08 07:19:10 +02:00
2021-09-16 13:17:01 -05:00
2021-03-04 12:34:46 +08:00
2021-09-15 15:46:48 -04:00
2021-11-16 19:18:05 +01:00
2021-10-11 20:46:25 +08:00
2021-10-01 13:51:10 +00:00
2021-01-07 18:07:09 +02:00
2021-01-04 12:31:31 +08:00
2021-10-05 11:11:18 +02:00
2021-09-30 07:41:57 +08:00
2021-05-27 13:50:11 -04:00
2021-05-19 19:41:05 +02:00
2021-07-15 12:52:38 -07:00
2021-11-17 09:25:14 +01:00
2021-09-28 22:21:10 -04:00
2021-09-03 05:21:58 -04:00
2021-09-03 05:21:58 -04:00
2021-11-24 17:44:07 +01:00
2021-11-24 17:44:07 +01:00
2021-11-03 14:58:54 +01:00
2021-11-17 17:06:55 +01:00
2021-11-03 14:58:53 +01:00
2021-04-06 14:50:17 +08:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2021-08-04 19:20:32 +08:00
2021-08-04 19:20:32 +08:00
2021-10-22 12:32:16 +02:00
2021-08-23 18:53:34 +02:00
2021-11-16 13:38:12 +01:00
2021-06-12 12:25:28 -07:00
2021-10-05 23:53:33 +02:00
2021-11-24 11:04:37 +01:00
2021-05-04 06:55:31 +02:00
2021-09-24 15:40:04 +08:00
2021-11-16 09:56:45 +01:00
2021-10-19 15:47:53 +02:00
2021-10-01 13:51:10 +00:00
2021-11-16 09:56:45 +01:00
2021-05-31 14:56:17 +02:00
2021-04-04 18:08:36 +02:00
2021-11-16 09:56:45 +01:00
2021-09-07 09:11:10 +02:00
2021-03-15 10:41:30 +08:00
2021-11-24 11:04:37 +01:00
2021-11-09 17:41:21 +01:00
2021-09-29 18:46:30 +02:00
2021-09-06 23:43:51 +02:00
2021-11-16 09:56:45 +01:00
2020-12-31 09:45:41 +01:00
2021-09-27 06:57:20 -04:00
2021-07-05 08:59:38 +03:00
2021-10-05 11:10:47 -04:00
2021-11-16 09:56:45 +01:00
2021-09-27 06:57:20 -04:00
2021-08-20 16:59:41 +02:00
2021-11-03 08:59:03 +01:00
2021-11-03 08:59:03 +01:00
2021-02-27 01:08:09 +10:00
2021-07-20 13:12:42 +01:00
2021-10-22 12:32:16 +02:00
2020-10-12 12:14:53 -07:00
2020-12-31 09:45:41 +01:00
2021-05-24 12:14:16 -07:00
2021-11-10 14:35:22 +01:00
2021-11-10 14:35:22 +01:00
2020-09-22 11:34:30 -04:00
2020-09-22 11:34:30 -04:00
2020-12-31 09:45:41 +01:00
2021-06-30 08:19:12 +10:00
2021-06-30 08:19:12 +10:00
2020-12-31 09:45:41 +01:00
2020-12-31 09:45:41 +01:00
2021-11-16 09:56:45 +01:00