Skip to content

Conversation

@ahf
Copy link

@ahf ahf commented May 17, 2012

This patch fixes compilation on Mac OS X since the CSemaphore on Mac OS X uses the Sleep() function in the sync.h file.

@laanwj
Copy link
Member

laanwj commented May 17, 2012

Nice try, but this creates a circular dependency (util.hsync.h). Please solve it in another way.

@sipa
Copy link
Member

sipa commented May 17, 2012

Hmm, strange, some people tried this on OSX without problems...

Anyway, I suppose Sleep() could move to sync, if it's a problem.

@laanwj
Copy link
Member

laanwj commented May 17, 2012

Probably depends on the compiler version. Newer compilers will reject the use of undefined functions and types in parametrized templates. Older compilers will only check at instantiation time, so will let this pass.

@ahf
Copy link
Author

ahf commented May 17, 2012

Where exactly is the circular dependency between those headers? sync.h includes util.h only on OS X if this patch is applied, but util.h only includes netbase.h which does not include sync.h.

How would you prefer this to be solved? A forward declaration or moving the Sleep() function around?

@laanwj
Copy link
Member

laanwj commented May 17, 2012

You could also help testing #1292, which gets rid of the sleep workaround on MacOSX.

@ahf
Copy link
Author

ahf commented May 17, 2012

Looks much better. Let's continue with that instead.

@ahf ahf closed this May 17, 2012
suprnurd pushed a commit to chaincoin-legacy/chaincoin that referenced this pull request Dec 5, 2017
* Add last ping time to masternode_info_t

* Use thread safe functions to access mnodeman in masternodelist.cpp

* Fix masternodelist widget locking

* Protect access to widget data from StartAlias button
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request Jan 22, 2019
Setup the number of p2p message processing threads in init.cpp
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
bf74c6f [Cleanup] Remove stale UNITTEST network (Fuzzbawls)

Pull request description:

  This network is un-necessary as our unit test suite can simply be run
  with MainNet's parameters, which is basically what we already do.

  Minor conflict with bitcoin#1328 due to that PR having already removed one of the unused methods.

ACKs for top commit:
  random-zebra:
    utACK bf74c6f
  furszy:
    utACK bf74c6f and merging..

Tree-SHA512: 1b8c7b4178e2dc8d60fe89b4ce4d4ad476f433ced19d981e1d3e1043fd8468e269600fcbe30ee04f7954250a183f2bc34486ad9b37fd7d78aed828c47d662d77
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
23c9b6c Swap to newer method for genesis calculation; introduce Consensus namespace.. (barrystyle)

Pull request description:

  This is PR is the forth part of breaking up bitcoin#1209 into individual narrow-focused PRs. Original commit(s) were cherry-picked from @barrystyle's initial pre-squashed branch and then re-squashed (reference branch is at https://github.com/Fuzzbawls/PIVX/commits/pr-1209)

  Input Commits:
  Fuzzbawls@041c9ee
  Fuzzbawls@5d7e61c
  Fuzzbawls@cf696e4
  Fuzzbawls@18ab8ef
  Fuzzbawls@0a8338b

  Note: I didn't retain any transitional or "fixup" commits, so this PR is a single commit which takes the overall changeset of the above commits, along with some cleanup of unused/unneeded code that was in the original overall changeset (not-implemented BIP9 chain parameters, for example).

  -------------------

  This PR does two things:
  2. Establishes the `Consensus` namespace skeleton, with a minimum number of chain parameters moved into the new namespace. Additional PRs should be opened after this is merged that handle the moving of other consensus-specific chain parameters in a concise and narrow-focused manner.
  2. Refactors the method for initializing the genesis block on each chain (Mainnet, Testnet, Regtest) to be a function call rather than an in-class manual crafting of the block.

ACKs for top commit:
  random-zebra:
    ACK 23c9b6c
  furszy:
    ACK 23c9b6c

Tree-SHA512: dae6e1d887ade18855c9f1d16f625ec6d6e1cab890fe50eb045835798bab5df55475cdb6ec2e41326e48c568649b13f5e13adc49d21cba097feda2193fd28970
lateminer pushed a commit to lateminer/bitcoin that referenced this pull request May 6, 2020
64465b7 [Refactor] Consensus: Stake Modifier V2 (random-zebra)
8083725 [Refactor] Consensus: TimeProtocolV2 parameters (random-zebra)
4d1c696 [Refactor] Consensus: nStakeMinAge, nStakeMinDepth, nFutureTimeDrift (random-zebra)
e69cee2 [Refactor] Consensus: restore nMaxMoneyOut as consensus param (random-zebra)
08a581d [Refactor] Consensus: fAllowMinDifficultyBlocks, fPowNoRetargeting (random-zebra)
ca6ea3c [Refactor] Consensus: nTargetTimespan, nTargetSpacing, nTimeSlotLength (random-zebra)
a281dee [Refactor] Consensus: remove unneeded getters. Rename BIP65Height (random-zebra)
284271c [Refactor] Consensus: bnProofOfWorkLimit / bnProofOfStakeLimit (v1-v2) (random-zebra)

Pull request description:

  This PR builds on
  - [x] bitcoin#1328

  Populates the `consensus` struct with all relevant consensus parameters.
  Resets `nMaxMoneyOut` as chain param (with different value for TestNet).
  Cleans up several unneeded fields in ChainParams.

  EDIT: Current PR has been split in two. Second part is bitcoin#1344

ACKs for top commit:
  furszy:
    good, utACK 64465b7.
  Fuzzbawls:
    utACK 64465b7

Tree-SHA512: d3e46bc8bb2ad9ee48abcbc4d4b1df2f59914360aaca72e93e19a5578248ecb95fd6a422477238e4736bc767d4e226f5b7f867174d96dcace73621946bf84df8
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants