Merge #6199: fix: compile error due to rebase mistake between bitcoin#22937 and ipc/process

540f6871d3 fix: lock `::cs_main` before accessing `ChainstateManager::m_best_header` (Kittywhiskers Van Gogh)
aafded67d9 fix: compilation error due to rebase error between bitcoin#22937 and ipc/process (Kittywhiskers Van Gogh)

Pull request description:

  ## Issue being fixed or feature implemented
  CI failure for multiprocess

  ## What was done?
  It resolve compilation failure on develop (apply changes from 22937 to ipc/process)

  See alternate solutions:
   - https://github.com/dashpay/dash/pull/6192
   - https://github.com/dashpay/dash/pull/6195

  ## How Has This Been Tested?
  Run build locally:
  ```
  make MULTIPROCESS=1 -j10
  ./configure --prefix=$(pwd)/depends/x86_64-pc-linux-gnu --enable-suppress-external-warnings --enable-werror    --enable-debug --enable-crash-hooks  --enable-maintainer-mode --enable-stacktraces  --enable-multi-process
  ```

  ## Breaking Changes
  N/A

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

ACKs for top commit:
  PastaPastaPasta:
    utACK 540f6871d3

Tree-SHA512: 75b675e93763e8e53086a10b93516b8ec94418902f9be2de738517176cc835c0dad25c286426089a5327a9c13d1787b89debda2c6025cb598489204d7d5af2cf
This commit is contained in:
pasta 2024-08-12 18:46:14 +07:00
commit 25eef1e8ca
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984
2 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ void CDSNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindexNew, con
if (pindexNew == pindexFork) // blocks were disconnected without any new ones if (pindexNew == pindexFork) // blocks were disconnected without any new ones
return; return;
m_mn_sync.UpdatedBlockTip(m_chainman.m_best_header, pindexNew, fInitialDownload); m_mn_sync.UpdatedBlockTip(WITH_LOCK(::cs_main, return m_chainman.m_best_header), pindexNew, fInitialDownload);
// Update global DIP0001 activation status // Update global DIP0001 activation status
fDIP0001ActiveAtTip = pindexNew->nHeight >= Params().GetConsensus().DIP0001Height; fDIP0001ActiveAtTip = pindexNew->nHeight >= Params().GetConsensus().DIP0001Height;

View File

@ -30,8 +30,8 @@ public:
return mp::SpawnProcess(pid, [&](int fd) { return mp::SpawnProcess(pid, [&](int fd) {
fs::path path = argv0_path; fs::path path = argv0_path;
path.remove_filename(); path.remove_filename();
path.append(new_exe_name); path /= fs::PathFromString(new_exe_name);
return std::vector<std::string>{path.string(), "-ipcfd", strprintf("%i", fd)}; return std::vector<std::string>{fs::PathToString(path), "-ipcfd", strprintf("%i", fd)};
}); });
} }
int waitSpawned(int pid) override { return mp::WaitProcess(pid); } int waitSpawned(int pid) override { return mp::WaitProcess(pid); }