Skip to content

Conversation

promag
Copy link
Contributor

@promag promag commented Mar 30, 2020

Based on #18338, only last commit matters. Quoting the test description:

// Test UnregisterSharedValidationInterface ensuring that if interface is
// unregistered during the middle of a callback, interface is destroyed as soon
// as callback returns.

All credits to ryanofsky.

@promag
Copy link
Contributor Author

promag commented Mar 30, 2020

Initially this was in #18338, decided to push a new PR because some travis job hanged.

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 30, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 4, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 4, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 4, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 4, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 5, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 6, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 6, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Apr 6, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
laanwj added a commit that referenced this pull request Apr 6, 2020
d6815a2 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: #18517, #18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2
  laanwj:
    ACK d6815a2
  hebasto:
    re-ACK d6815a2
  promag:
    ACK d6815a2.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
@ryanofsky
Copy link
Contributor

I think #18524 (now merged) might fix the xenial test hang: https://travis-ci.org/github/bitcoin/bitcoin/jobs/668847707

@maflcko maflcko closed this Apr 6, 2020
@maflcko maflcko reopened this Apr 6, 2020
@maflcko maflcko removed the GUI label Apr 6, 2020
sipa and others added 2 commits April 6, 2020 19:06
The previous code for MainSignalsInstance::Clear would decrement the reference
count of every interface, including ones that were already Unregister()ed but
still being executed.
@promag promag force-pushed the 2020-03-test-shared-validation-interface branch from 0e3aeb5 to c976165 Compare April 7, 2020 09:42
@promag
Copy link
Contributor Author

promag commented Apr 7, 2020

Now based on #18551, applied the following change to the test to account for @sipa fix (this now fails in master):

@@ -397,6 +397,7 @@ BOOST_AUTO_TEST_CASE(release_shared)
     BOOST_CHECK(!test_interface);
     BOOST_CHECK_EQUAL(state, CALLED);
     state = UNREGISTERED;
+    UnregisterAllValidationInterfaces();
     unregistered.set_value(true);
     BOOST_CHECK(destroyed.get_future().get());
     BOOST_CHECK_EQUAL(state, DESTROYED);

@promag
Copy link
Contributor Author

promag commented Apr 7, 2020

appveyor failed with OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted, restarted.

glozow pushed a commit to glozow/bitcoin that referenced this pull request Apr 10, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
HashUnlimited pushed a commit to HashUnlimited/chaincoin that referenced this pull request Apr 17, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin#18517
bitcoin#18471
@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 20, 2020
Summary:
d6815a2313158862d448733954a73520f223deb6 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: bitcoin/bitcoin#18517, bitcoin/bitcoin#18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2313158862d448733954a73520f223deb6
  laanwj:
    ACK d6815a2313158862d448733954a73520f223deb6
  hebasto:
    re-ACK d6815a2313158862d448733954a73520f223deb6
  promag:
    ACK d6815a2313158862d448733954a73520f223deb6.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919

Backport of Core [[bitcoin/bitcoin#18524 | PR18524]]

Depends on D6652

Test Plan: `ninja check check-functional`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D6653
janus pushed a commit to janus/bitgesell that referenced this pull request Nov 5, 2020
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin/bitcoin#18517
bitcoin/bitcoin#18471
backpacker69 pushed a commit to peercoin/peercoin that referenced this pull request Mar 28, 2021
Stop using boost::signals2 internally in validationinterface. Replace with
std::list and Add/Remove/Clear/Iterate helper functions.

Motivation for change is to reduce dependencies and avoid issues happening with
boost versions before 1.59:

bitcoin/bitcoin#18517
bitcoin/bitcoin#18471
@fanquake
Copy link
Member

fanquake commented Apr 8, 2021

@promag are you still interested in working on / making this change?

@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?
  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

1 similar comment
@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?
  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Apr 5, 2022
…rface

d6815a2 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: bitcoin#18517, bitcoin#18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2
  laanwj:
    ACK d6815a2
  hebasto:
    re-ACK d6815a2
  promag:
    ACK d6815a2.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
@fanquake fanquake closed this Apr 26, 2022
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request May 19, 2022
…rface

d6815a2 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: bitcoin#18517, bitcoin#18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2
  laanwj:
    ACK d6815a2
  hebasto:
    re-ACK d6815a2
  promag:
    ACK d6815a2.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request May 26, 2022
…rface

d6815a2 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: bitcoin#18517, bitcoin#18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2
  laanwj:
    ACK d6815a2
  hebasto:
    re-ACK d6815a2
  promag:
    ACK d6815a2.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Jun 14, 2022
…rface

d6815a2 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: bitcoin#18517, bitcoin#18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2
  laanwj:
    ACK d6815a2
  hebasto:
    re-ACK d6815a2
  promag:
    ACK d6815a2.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Jun 20, 2022
…rface

d6815a2 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: bitcoin#18517, bitcoin#18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2
  laanwj:
    ACK d6815a2
  hebasto:
    re-ACK d6815a2
  promag:
    ACK d6815a2.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
vijaydasmp pushed a commit to vijaydasmp/dash that referenced this pull request Jun 22, 2022
…rface

d6815a2 refactor: drop boost::signals2 in validationinterface (Russell Yanofsky)

Pull request description:

  Stop using boost::signals2 internally in validationinterface. Replace with std::list and Add/Remove/Clear/Iterate helper functions.

  Motivation for change is to reduce dependencies and avoid issues happening with boost versions before 1.59: bitcoin#18517, bitcoin#18471

ACKs for top commit:
  MarcoFalke:
    ACK d6815a2
  laanwj:
    ACK d6815a2
  hebasto:
    re-ACK d6815a2
  promag:
    ACK d6815a2.

Tree-SHA512: 4fc0f14a8446e8616cc142af6c3d36815f3254525d30348ba8e4d4bc74c249a5a8c9bc119bdd1be7ebd7abe0b784bc0c5551a3e156a766890cb2fdd891a95919
@bitcoin bitcoin locked and limited conversation to collaborators Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants