Files
bitcoin/src
Andrew Chow 2c2150aa04 Merge bitcoin/bitcoin#26828: assumeutxo: catch and log fs::remove error instead of two exist checks
0e21b56a44 assumeutxo: catch and log fs::remove error instead of two exist checks (Andrew Toth)

Pull request description:

  Fixes a block of code which seems to be incorrectly performing two existence checks instead of catching and logging errors. `fs::remove` returns `false` only if the file being removed does not exist, so it is redundant with the `fs::exists` check. If an error does occur when trying to remove an existing file, `fs::remove` will throw. See https://en.cppreference.com/w/cpp/filesystem/remove.

  Also see https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp#L326-L332 for a similar pattern.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 0e21b56a44
  jamesob:
    ACK 0e21b56a44
  achow101:
    ACK 0e21b56a44

Tree-SHA512: 137d0be5266cfd947e5e50ec93b895ac659adadf9413bef3468744bfdacee8dbe7d9bdfaf91784c45708610325d2241a114f4be4e622a108a639b3672b618fd2
2023-06-23 16:21:43 -04:00
..
2023-03-23 12:55:18 +01:00
2023-03-23 19:38:38 +01:00
2023-03-23 19:38:38 +01:00
2023-03-23 12:55:18 +01:00
2023-03-23 12:55:18 +01:00
2023-03-23 12:55:18 +01:00
2023-06-08 11:52:30 +02:00
2023-03-23 12:55:18 +01:00