Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize header dependencies; improve Makefile dependency graph #226

Merged
merged 8 commits into from
Jun 14, 2011

Conversation

jordanlewis
Copy link
Contributor

This patch set includes the following changes:

  • Remove unused #includes
  • Factor out #includes that are only needed in some source files from headers.h
  • Add dependency tracking to unix, mac, and mingw makefiles via gcc's -MMD flag

These changes improve bitcoin's development environment. Previously changing any header file caused a global recompile. With these changes, only those files that directly depend on a changed header file will require recompilation.

@sipa
Copy link
Member

sipa commented May 16, 2011

rpc.cpp: In function ‘void ThreadRPCServer2(void*)’:
rpc.cpp:1832: error: ‘filesystem’ has not been declared
rpc.cpp:1832: error: expected ‘;’ before ‘certfile’
rpc.cpp:1833: error: ‘certfile’ was not declared in this scope
rpc.cpp:1833: error: ‘filesystem’ has not been declared
rpc.cpp:1834: error: ‘filesystem’ has not been declared
rpc.cpp:1834: error: ‘certfile’ was not declared in this scope
rpc.cpp:1836: error: ‘filesystem’ has not been declared
rpc.cpp:1836: error: expected ‘;’ before ‘pkfile’
rpc.cpp:1837: error: ‘pkfile’ was not declared in this scope
rpc.cpp:1837: error: ‘filesystem’ has not been declared
rpc.cpp:1838: error: ‘filesystem’ has not been declared
rpc.cpp:1838: error: ‘pkfile’ was not declared in this scope

@jordanlewis
Copy link
Contributor Author

Thanks - I didn't see that with g++4.3/amd64 - could you please tell me what platform and compiler you're using?

@jordanlewis
Copy link
Contributor Author

OK, I fixed the issue.

@TheBlueMatt
Copy link
Contributor

ui.cpp: In member function ‘virtual void CMainFrame::OnClose(wxCloseEvent&)’:
ui.cpp:382:22: error: ‘Shutdown’ was not declared in this scope
ui.cpp: In member function ‘virtual void CMainFrame::OnIconize(wxIconizeEvent&)’:
ui.cpp:393:25: warning: ‘bool wxIconizeEvent::Iconized() const’ is deprecated (declared at /usr/local/include/wx-2.9/wx/event.h:2072)
ui.cpp:401:43: warning: ‘bool wxIconizeEvent::Iconized() const’ is deprecated (declared at /usr/local/include/wx-2.9/wx/event.h:2072)
ui.cpp: At global scope:
ui.cpp:1541:1: error: ‘filesystem’ in namespace ‘boost’ does not name a type
ui.cpp:1552:1: error: ‘filesystem’ in namespace ‘boost’ does not name a type
ui.cpp: In function ‘bool GetStartOnSystemStartup()’:
ui.cpp:1559:12: error: ‘boost::filesystem’ has not been declared
ui.cpp:1559:33: error: expected ‘;’ before ‘optionFile’
ui.cpp:1560:10: error: ‘optionFile’ was not declared in this scope
ui.cpp:1564:13: error: ‘optionFile’ was not declared in this scope
ui.cpp:1571:5: error: ‘optionFile’ was not declared in this scope
ui.cpp: In function ‘void SetStartOnSystemStartup(bool)’:
ui.cpp:1580:37: error: ‘GetAutostartFilePath’ was not declared in this scope
ui.cpp:1589:16: error: ‘boost::filesystem’ has not been declared
ui.cpp:1589:63: error: ‘GetAutostartDir’ was not declared in this scope
ui.cpp:1591:16: error: ‘boost::filesystem’ has not been declared
ui.cpp:1591:37: error: expected ‘;’ before ‘optionFile’
ui.cpp:1592:14: error: ‘optionFile’ was not declared in this scope
ui.cpp:1598:9: error: ‘optionFile’ was not declared in this scope
ui.cpp: In member function ‘bool CSendingDialog::Status(const std::string&)’:
ui.cpp:2119:54: error: ‘strlcpy’ was not declared in this scope
ui.cpp: In member function ‘void CMyTaskBarIcon::Show(bool)’:
ui.cpp:2609:71: error: ‘strlcpy’ was not declared in this scope
ui.cpp:2621:51: error: ‘strlcpy’ was not declared in this scope
ui.cpp: In member function ‘virtual bool CMyApp::OnInit()’:
ui.cpp:2847:30: error: ‘AppInit’ was not declared in this scope
ui.cpp: In member function ‘virtual int CMyApp::OnExit()’:
ui.cpp:2852:18: error: ‘Shutdown’ was not declared in this scope

@jordanlewis
Copy link
Contributor Author

OK, issue should be fixed for DGUI now as well.

@TheBlueMatt
Copy link
Contributor

ui.cpp: In function ‘void SetStartOnSystemStartup(bool)’:
ui.cpp:1590:9: error: ‘create_directories’ is not a member of ‘boost::filesystem’
ui.cpp: In member function ‘bool CSendingDialog::Status(const std::string&)’:
ui.cpp:2120:54: error: ‘strlcpy’ was not declared in this scope
ui.cpp: In member function ‘void CMyTaskBarIcon::Show(bool)’:
ui.cpp:2610:71: error: ‘strlcpy’ was not declared in this scope
ui.cpp:2622:51: error: ‘strlcpy’ was not declared in this scope
ui.cpp: In member function ‘virtual bool CMyApp::OnInit()’:
ui.cpp:2848:30: error: ‘AppInit’ was not declared in this scope
ui.cpp: In member function ‘virtual int CMyApp::OnExit()’:
ui.cpp:2853:18: error: ‘Shutdown’ was not declared in this scope

@jordanlewis
Copy link
Contributor Author

I've rebased the above fixes for further review.

@jgarzik
Copy link
Contributor

jgarzik commented May 17, 2011

All patches look OK. I would elide the *.d commit, because we'll be doing that via GNU autotools as soon as jaromil's branch is pulled (post 0.3.22 release).

@jordanlewis
Copy link
Contributor Author

.d commit elided.

@gavinandresen
Copy link
Contributor

ACK- should be pulled for the release-after-0.3.23

jgarzik pushed a commit that referenced this pull request Jun 14, 2011
Optimize header dependencies; improve Makefile dependency graph
@jgarzik jgarzik merged commit 19ea442 into bitcoin:master Jun 14, 2011
zathras-crypto pushed a commit to zathras-crypto/omnicore that referenced this pull request Dec 8, 2014
isTransactionTypeAllowed bypass for property = 0
dexX7 added a commit to dexX7/bitcoin that referenced this pull request Jan 4, 2016
4d06a8d Remove checkpoint tests for old hashing process (zathras-crypto)
755abb5 Remove second tally lock (thanks @dexX7) (zathras-crypto)
959264f Break out consensus string generation (thanks @dexX7) (zathras-crypto)
1a8ad4f Update checkpoints to reflect new consensus hashing process (zathras-crypto)
18669b4 Add current issuer address for properties to consensus hash (zathras-crypto)
7b7fd42 Update checkpoints for new consensus hash algo (zathras-crypto)
5af9547 Remove reserved amounts from DEx sell data added to consensus hash (zathras-crypto)
a902c4d Remove unused GetTallyPropertyTotal() (zathras-crypto)
d51edb2 Switch properties to next available instead of token counts (thanks @dexX7) (zathras-crypto)
66561dd Tidy up consensus hashing changes (zathras-crypto)
af151cb Sort DEx accepts by matching txid then buyer for consensus hashing (zathras-crypto)
95e92ea Order DEx offers and MetaDEx trades by txid in consensus hash (zathras-crypto)
a98132a Order crowd data in consensus hash by property id (zathras-crypto)
6cbd79d Add DEx accept to consensus hash (zathras-crypto)
f726c50 Add property id and total amount of tokens to consensus hash (zathras-crypto)
86a6176 Add crowdsale data to consensus hash (zathras-crypto)
ffe6206 Add MetaDEx trade data to consensus hash (zathras-crypto)
abeba7a Allow generating consensus hashes after each Omni transaction (zathras-crypto)
fdee9d5 Fix format specifiers for DEx data in consensus hash (zathras-crypto)
f394ed1 Add DEx offers to consensus hash calculations (zathras-crypto)
1eafd66 Extract GetConsensusHash() into consensushash.h/cpp (zathras-crypto)
destenson pushed a commit to destenson/bitcoin--bitcoin that referenced this pull request Jun 26, 2016
Increase OP_ RETURN relay to 80 bytes
ptschip pushed a commit to ptschip/bitcoin that referenced this pull request Jan 14, 2017
Release Branch - Fix maxblocksinflight
deadalnix pushed a commit to deadalnix/bitcoin that referenced this pull request May 10, 2017
Remove explicit check for -nodebug arg
Losangelosgenetics pushed a commit to Losangelosgenetics/bitcoin that referenced this pull request Mar 12, 2020
cryptapus pushed a commit to cryptapus/bitcoin that referenced this pull request May 3, 2021
d189372 Explicitly handle name outputs for listunspent. (Daniel Kraft)
80268a7 Make name-script-to-JSON publicly accessible. (Daniel Kraft)

Pull request description:

  Previously, `listunspent` did not explicitly handle name outputs - and as a consequence, they were just shown mixed in with (and undistinguishable from) the currency outputs.  This adds explicit handling:

  * Any *expired* name outputs are always excluded, as they are unspendable.
  * Other name outputs are included in the results only if the new `includeNames` RPC option, which is off by default, is set.
  * If name outputs are included in the result, then they are marked by a `nameOp` field equivalent to that of `decoderawtransaction`.

  This implements namecoin/namecoin-core#192.

Tree-SHA512: ab0adb465ca71127688cb05b9cf41685b349b821bc951916967af980baeb18afd6fdf42bd429139fa30868f023166bac7c251ddbcfdf83cbb2d4e889c6afe492
rajarshimaitra pushed a commit to rajarshimaitra/bitcoin that referenced this pull request Aug 5, 2021
@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.

None yet

5 participants