-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Globals: Make AcceptBlockHeader static (Fix #6163) (AcceptBlockHeader) #6982
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
Conversation
-CheckBlockIndex -DisconnectTip -GetTransaction -InvalidateBlock -ProcessGetData -ReadBlockFromDisk
utACK |
1 similar comment
utACK |
utACK |
@MarcoFalke Yes, it is not critical. In fact, just removing the unused declaration in main.h (unused because it's a different function from the one defined in .cpp, even if the name it's the same, that's why the mistake didn't break anything) would also solve it. Which makes me think...should I also make the function static (the change would be +3 -5 instead of +5 -5)? |
..and at the same time prevent AcceptBlockHeader() from calling global function Params()
As the compiler doesn't catch this error, the declaration is clearly unnecessary and should be removed IMO |
Made static and renamed PR and commit (more documentation in the commit itself). |
utACK |
1 similar comment
utACK |
ACK |
ut(re)ACK |
utACK |
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5994 - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5994 - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5994 - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5994 - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#5994 - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters, and various other functions in `main.cpp` have `const CChainParams&` arguments added. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters, and various other functions in `main.cpp` have `const CChainParams&` arguments added. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters, and various other functions in `main.cpp` have `const CChainParams&` arguments added. Part of #2074.
Bitcoin Core refactoring and cleanups 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6538 - bitcoin/bitcoin#6163 - bitcoin/bitcoin#6982 - bitcoin/bitcoin#6986 - bitcoin/bitcoin#7053 - bitcoin/bitcoin#7444 - bitcoin/bitcoin#7793 - Excluding some comments in `txmempool.h` on code we haven't yet pulled in. - bitcoin/bitcoin#7916 - bitcoin/bitcoin#7815 Additionally, the Equihash parameters are moved into the consensus parameters, and various other functions in `main.cpp` have `const CChainParams&` arguments added. Part of #2074.
As discussed in jtimon@87cbdb8#commitcomment-14304228, the PR #6163 (commit jtimon@87cbdb8 ) contained one error: it changed AcceptBlockHeader's declaration without correspondingly changing its definition and it also added Consensus::Params as parameter instead of CChainParams.
This fixes the mistake.