-
Notifications
You must be signed in to change notification settings - Fork 36.7k
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
[net] Don't incorrectly log that REJECT messages are unknown. #13162
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ```
utACK fad63eb |
utACK fad63eb Nice cleanup |
utACK fad63eb |
maflcko
changed the title
[logging] Don't incorrectly log that REJECT messages are unknown.
[net] Don't incorrectly log that REJECT messages are unknown.
May 3, 2018
Changed label to [net], since this reworks the control flow and fixes the logging as side effect. |
ACK |
utACK fad63eb |
laanwj
added a commit
that referenced
this pull request
May 7, 2018
…known. fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
laanwj
added a commit
that referenced
this pull request
Aug 25, 2018
fa6c3de p2p: Clarify control flow in ProcessMessage() (MarcoFalke) Pull request description: `ProcessMessage` is effectively a massive switch case construct. In the past there were attempts to clarify the control flow in `ProcessMessage()` by moving each case into a separate static function (see #9608). It was closed because it wasn't clear if moving each case into a function was the right approach. Though, we can quasi treat each case as a function by adding a return statement to each case. (Can be seen as a continuation of bugfix #13162) This patch does exactly that. Also note that this patch is a subset of previous approaches such as #9608 and #10145. Review suggestion: `git diff HEAD~ --function-context` Tree-SHA512: 91f6106840de2f29bb4f10d27bae0616b03a91126e6c6013479e1dd79bee53f22a78902b631fe85517dd5dc0fa7239939b4fefc231851a13c819458559f6c201
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 25, 2020
fa6c3de p2p: Clarify control flow in ProcessMessage() (MarcoFalke) Pull request description: `ProcessMessage` is effectively a massive switch case construct. In the past there were attempts to clarify the control flow in `ProcessMessage()` by moving each case into a separate static function (see bitcoin#9608). It was closed because it wasn't clear if moving each case into a function was the right approach. Though, we can quasi treat each case as a function by adding a return statement to each case. (Can be seen as a continuation of bugfix bitcoin#13162) This patch does exactly that. Also note that this patch is a subset of previous approaches such as bitcoin#9608 and bitcoin#10145. Review suggestion: `git diff HEAD~ --function-context` Tree-SHA512: 91f6106840de2f29bb4f10d27bae0616b03a91126e6c6013479e1dd79bee53f22a78902b631fe85517dd5dc0fa7239939b4fefc231851a13c819458559f6c201
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Jan 28, 2020
… are unknown. fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jan 28, 2020
… are unknown. fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Jan 31, 2020
fa6c3de p2p: Clarify control flow in ProcessMessage() (MarcoFalke) Pull request description: `ProcessMessage` is effectively a massive switch case construct. In the past there were attempts to clarify the control flow in `ProcessMessage()` by moving each case into a separate static function (see bitcoin#9608). It was closed because it wasn't clear if moving each case into a function was the right approach. Though, we can quasi treat each case as a function by adding a return statement to each case. (Can be seen as a continuation of bugfix bitcoin#13162) This patch does exactly that. Also note that this patch is a subset of previous approaches such as bitcoin#9608 and bitcoin#10145. Review suggestion: `git diff HEAD~ --function-context` Tree-SHA512: 91f6106840de2f29bb4f10d27bae0616b03a91126e6c6013479e1dd79bee53f22a78902b631fe85517dd5dc0fa7239939b4fefc231851a13c819458559f6c201 More of 13946
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Jan 31, 2020
… are unknown. fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Feb 3, 2020
fa6c3de p2p: Clarify control flow in ProcessMessage() (MarcoFalke) Pull request description: `ProcessMessage` is effectively a massive switch case construct. In the past there were attempts to clarify the control flow in `ProcessMessage()` by moving each case into a separate static function (see bitcoin#9608). It was closed because it wasn't clear if moving each case into a function was the right approach. Though, we can quasi treat each case as a function by adding a return statement to each case. (Can be seen as a continuation of bugfix bitcoin#13162) This patch does exactly that. Also note that this patch is a subset of previous approaches such as bitcoin#9608 and bitcoin#10145. Review suggestion: `git diff HEAD~ --function-context` Tree-SHA512: 91f6106840de2f29bb4f10d27bae0616b03a91126e6c6013479e1dd79bee53f22a78902b631fe85517dd5dc0fa7239939b4fefc231851a13c819458559f6c201
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Feb 3, 2020
… are unknown. fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
MIPPL
pushed a commit
to MIPPL/biblepay
that referenced
this pull request
May 15, 2020
* commit '351fbf65efc9459cb69a3c843cc205a8b94c95b3': (987 commits) Update release-notes Bump nMinimumChainWork and defaultAssumeValid (dashpay#3336) Update release notes Try to actually accept newly created dstx-es into masternode's mempool (dashpay#3332) Switch CLIENT_VERSION_IS_RELEASE to `true` for v0.15 (dashpay#3306) Update release notes Bring back "about" menu icon (dashpay#3329) Add pubKeyOperator to `quorum info` rpc response (dashpay#3327) Update release-notes.md Update translations 2020-02-03 (dashpay#3322) Only sync mempool from v0.15+ (proto 70216+) nodes (dashpay#3321) Fix dark text on dark background in combobox dropdowns on windows (dashpay#3315) Fix node protection logic false positives (dashpay#3314) Merge bitcoin#13162: [net] Don't incorrectly log that REJECT messages are unknown. More of 13946 Merge bitcoin#13946: p2p: Clarify control flow in ProcessMessage Add `automake` package to dash-win-signer's packages list (dashpay#3307) [Trivial] Release note update (dashpay#3308) Update release-notes.md Fix CActiveMasternodeManager::GetLocalAddress to prefer IPv4 if multiple local addresses are known (dashpay#3304) ... # Conflicts: # .gitignore # .travis.yml # COPYING # Makefile.am # README.md # ci/test_unittests.sh # configure.ac # contrib/README.md # contrib/debian/control # contrib/devtools/optimize-pngs.py # contrib/gitian-build.py # contrib/gitian-descriptors/gitian-linux.yml # contrib/gitian-descriptors/gitian-osx.yml # contrib/gitian-descriptors/gitian-win-signer.yml # contrib/gitian-descriptors/gitian-win.yml # contrib/init/README.md # contrib/seeds/README.md # contrib/verifybinaries/verify.sh # doc/README.md # doc/README_windows.txt # doc/build-generic.md # doc/build-unix.md # doc/files.md # doc/man/biblepay-cli.1 # doc/man/biblepay-qt.1 # doc/man/biblepay-tx.1 # doc/man/biblepayd.1 # doc/release-notes.md # doc/release-process.md # qa/README.md # qa/rpc-tests/autois-mempool.py # qa/rpc-tests/maxblocksinflight.py # qa/rpc-tests/multikeysporks.py # qa/rpc-tests/p2p-acceptblock.py # qa/rpc-tests/p2p-autoinstantsend.py # share/pixmaps/dash128.png # share/pixmaps/dash16.png # share/pixmaps/dash32.png # share/pixmaps/dash64.png # src/Makefile.am # src/Makefile.qt.include # src/Makefile.qttest.include # src/Makefile.test.include # src/addrman.h # src/alert.cpp # src/alert.h # src/bench/bls.cpp # src/bench/crypto_hash.cpp # src/biblepay-cli.cpp # src/biblepayd.cpp # src/blockencodings.cpp # src/bls/bls.cpp # src/bls/bls.h # src/bls/bls_worker.cpp # src/bls/bls_worker.h # src/cachemap.h # src/cachemultimap.h # src/chain.h # src/chainparams.cpp # src/checkpoints.cpp # src/clientversion.h # src/evo/cbtx.cpp # src/evo/cbtx.h # src/evo/deterministicmns.h # src/evo/evodb.cpp # src/evo/evodb.h # src/evo/providertx.cpp # src/evo/providertx.h # src/evo/simplifiedmns.h # src/evo/specialtx.cpp # src/evo/specialtx.h # src/flat-database.h # src/governance/governance-classes.cpp # src/governance/governance-exceptions.h # src/governance/governance-object.cpp # src/governance/governance-object.h # src/governance/governance-validators.cpp # src/governance/governance-validators.h # src/governance/governance-vote.h # src/governance/governance-votedb.cpp # src/governance/governance-votedb.h # src/governance/governance.cpp # src/hash.h # src/hdchain.cpp # src/hdchain.h # src/httpserver.cpp # src/init.cpp # src/instantx.cpp # src/instantx.h # src/keepass.cpp # src/keepass.h # src/llmq/quorums_blockprocessor.h # src/llmq/quorums_commitment.h # src/masternode/activemasternode.cpp # src/masternode/masternode-payments.cpp # src/masternode/masternode-sync.cpp # src/messagesigner.cpp # src/messagesigner.h # src/miner.cpp # src/net.cpp # src/net.h # src/net_processing.cpp # src/netbase.cpp # src/netfulfilledman.cpp # src/netfulfilledman.h # src/policy/feerate.cpp # src/policy/fees.cpp # src/pow.cpp # src/primitives/transaction.h # src/privatesend/privatesend-client.cpp # src/privatesend/privatesend-client.h # src/privatesend/privatesend-server.cpp # src/privatesend/privatesend-server.h # src/privatesend/privatesend-util.cpp # src/privatesend/privatesend-util.h # src/privatesend/privatesend.cpp # src/privatesend/privatesend.h # src/protocol.cpp # src/qt/addressbookpage.cpp # src/qt/addresstablemodel.cpp # src/qt/askpassphrasedialog.cpp # src/qt/biblepay.cpp # src/qt/biblepay.qrc # src/qt/bitcoingui.cpp # src/qt/clientmodel.h # src/qt/dash_locale.qrc # src/qt/dashstrings.cpp # src/qt/forms/helpmessagedialog.ui # src/qt/forms/masternodelist.ui # src/qt/forms/optionsdialog.ui # src/qt/guiconstants.h # src/qt/guiutil.cpp # src/qt/guiutil.h # src/qt/locale/biblepay_ar.ts # src/qt/locale/biblepay_bg.ts # src/qt/locale/biblepay_de.ts # src/qt/locale/biblepay_en.ts # src/qt/locale/biblepay_es.ts # src/qt/locale/biblepay_fi.ts # src/qt/locale/biblepay_fr.ts # src/qt/locale/biblepay_it.ts # src/qt/locale/biblepay_ja.ts # src/qt/locale/biblepay_ko.ts # src/qt/locale/biblepay_nl.ts # src/qt/locale/biblepay_pl.ts # src/qt/locale/biblepay_pt.ts # src/qt/locale/biblepay_ru.ts # src/qt/locale/biblepay_sk.ts # src/qt/locale/biblepay_sv.ts # src/qt/locale/biblepay_th.ts # src/qt/locale/biblepay_tr.ts # src/qt/locale/biblepay_vi.ts # src/qt/locale/biblepay_zh_CN.ts # src/qt/locale/biblepay_zh_TW.ts # src/qt/networkstyle.cpp # src/qt/optionsdialog.cpp # src/qt/overviewpage.cpp # src/qt/paymentserver.cpp # src/qt/res/css/bezaleel.css # src/qt/res/css/dark.css # src/qt/res/css/drkblue.css # src/qt/res/css/light-hires-retro.css # src/qt/res/css/light-hires.css # src/qt/res/css/light.css # src/qt/res/icons/about.png # src/qt/res/icons/about_qt.png # src/qt/res/icons/bezaleel/drkblue_address-book.png # src/qt/res/icons/bezaleel/drkblue_editcopy.png # src/qt/res/icons/bezaleel/drkblue_editpaste.png # src/qt/res/icons/bezaleel/drkblue_remove.png # src/qt/res/icons/bezaleel/fontbigger.png # src/qt/res/icons/bezaleel/fontsmaller.png # src/qt/res/icons/bezaleel/hd_disabled.png # src/qt/res/icons/bezaleel/hd_enabled.png # src/qt/res/icons/bezaleel/network_disabled.png # src/qt/res/icons/bezaleel/transaction_abandoned.png # src/qt/res/icons/bitcoin_testnet.png # src/qt/res/icons/browse.png # src/qt/res/icons/configure.png # src/qt/res/icons/crownium/fontbigger.png # src/qt/res/icons/crownium/fontsmaller.png # src/qt/res/icons/crownium/hd_disabled.png # src/qt/res/icons/crownium/hd_enabled.png # src/qt/res/icons/crownium/network_disabled.png # src/qt/res/icons/crownium/transaction_abandoned.png # src/qt/res/icons/dacicons/drkblue_editcopy.png # src/qt/res/icons/dacicons/drkblue_remove.png # src/qt/res/icons/debugwindow.png # src/qt/res/icons/drkblue/about.png # src/qt/res/icons/drkblue/masternodes.png # src/qt/res/icons/drkblue/overview.png # src/qt/res/icons/drkblue/tx_mined.png # src/qt/res/icons/drkblue/tx_output.png # src/qt/res/icons/filesave.png # src/qt/res/icons/fontbigger.png # src/qt/res/icons/fontsmaller.png # src/qt/res/icons/hd_disabled.png # src/qt/res/icons/hd_enabled.png # src/qt/res/icons/key.png # src/qt/res/icons/light-retro/about.png # src/qt/res/icons/light-retro/masternodes.png # src/qt/res/icons/light-retro/overview.png # src/qt/res/icons/light-retro/tx_mined.png # src/qt/res/icons/light/about.png # src/qt/res/icons/light/masternodes.png # src/qt/res/icons/light/overview.png # src/qt/res/icons/light/tx_mined.png # src/qt/res/icons/network_disabled.png # src/qt/res/icons/notsynced.png # src/qt/res/icons/quit.png # src/qt/res/icons/trad/about.png # src/qt/res/icons/trad/masternodes.png # src/qt/res/icons/trad/overview.png # src/qt/res/icons/trad/receive.png # src/qt/res/icons/trad/send.png # src/qt/res/icons/trad/tx_inout.png # src/qt/res/icons/trad/tx_input.png # src/qt/res/icons/trad/tx_mined.png # src/qt/res/icons/trad/tx_output.png # src/qt/res/icons/transaction_abandoned.png # src/qt/res/images/drkblue/about.png # src/qt/res/images/drkblue/checked.png # src/qt/res/images/drkblue/drkblue_walletFrame_bg.png # src/qt/res/images/drkblue/splash.png # src/qt/res/images/drkblue/splash_testnet.png # src/qt/res/images/drkblue/unchecked.png # src/qt/res/images/light-retro/about.png # src/qt/res/images/light-retro/checked.png # src/qt/res/images/light-retro/drkblue_downArrow.png # src/qt/res/images/light-retro/drkblue_downArrow_small.png # src/qt/res/images/light-retro/drkblue_leftArrow_small.png # src/qt/res/images/light-retro/drkblue_qtreeview_selected.png # src/qt/res/images/light-retro/drkblue_rightArrow_small.png # src/qt/res/images/light-retro/drkblue_upArrow_small.png # src/qt/res/images/light-retro/drkblue_walletFrame_bg.png # src/qt/res/images/light-retro/splash.png # src/qt/res/images/light-retro/splash_testnet.png # src/qt/res/images/light-retro/unchecked.png # src/qt/res/images/light/about.png # src/qt/res/images/light/checked.png # src/qt/res/images/light/drkblue_downArrow.png # src/qt/res/images/light/drkblue_downArrow_small.png # src/qt/res/images/light/drkblue_leftArrow_small.png # src/qt/res/images/light/drkblue_qtreeview_selected.png # src/qt/res/images/light/drkblue_rightArrow_small.png # src/qt/res/images/light/drkblue_upArrow_small.png # src/qt/res/images/light/drkblue_walletFrame_bg.png # src/qt/res/images/light/splash_testnet.png # src/qt/res/images/light/unchecked.png # src/qt/res/images/trad/about.png # src/qt/res/images/trad/drkblue_downArrow.png # src/qt/res/images/trad/drkblue_downArrow_small.png # src/qt/res/images/trad/drkblue_leftArrow_small.png # src/qt/res/images/trad/drkblue_qtreeview_selected.png # src/qt/res/images/trad/drkblue_rightArrow_small.png # src/qt/res/images/trad/drkblue_upArrow_small.png # src/qt/res/images/trad/drkblue_walletFrame_bg.png # src/qt/res/images/trad/splash.png # src/qt/res/images/trad/splash_testnet.png # src/qt/res/src/spinner.png # src/qt/rpcconsole.cpp # src/qt/sendcoinsdialog.cpp # src/qt/signverifymessagedialog.cpp # src/qt/splashscreen.cpp # src/qt/test/rpcnestedtests.cpp # src/qt/test/test_main.cpp # src/qt/test/uritests.cpp # src/qt/transactiondesc.cpp # src/qt/transactionrecord.cpp # src/qt/transactiontablemodel.cpp # src/qt/walletmodel.cpp # src/rpc/blockchain.cpp # src/rpc/governance.cpp # src/rpc/masternode.cpp # src/rpc/mining.cpp # src/rpc/misc.cpp # src/rpc/net.cpp # src/rpc/protocol.cpp # src/rpc/rawtransaction.cpp # src/rpc/rpcevo.cpp # src/rpc/server.cpp # src/script/biblepayconsensus.cpp # src/script/dashconsensus.h # src/sendalert.cpp # src/spork.cpp # src/spork.h # src/test/README.md # src/test/addrman_tests.cpp # src/test/alert_tests.cpp # src/test/amount_tests.cpp # src/test/blockencodings_tests.cpp # src/test/coins_tests.cpp # src/test/crypto_tests.cpp # src/test/cuckoocache_tests.cpp # src/test/data/alertTests.raw # src/test/merkle_tests.cpp # src/test/miner_tests.cpp # src/test/netbase_tests.cpp # src/test/pmt_tests.cpp # src/test/prevector_tests.cpp # src/test/ratecheck_tests.cpp # src/test/script_tests.cpp # src/test/sighash_tests.cpp # src/test/skiplist_tests.cpp # src/test/test_coin.cpp # src/test/test_coin.h # src/test/txvalidationcache_tests.cpp # src/test/util_tests.cpp # src/test/versionbits_tests.cpp # src/torcontrol.cpp # src/txdb.cpp # src/uint256.h # src/util.cpp # src/util.h # src/validation.cpp # src/validation.h # src/version.h # src/wallet/crypter.cpp # src/wallet/db.cpp # src/wallet/rpcdump.cpp # src/wallet/rpcwallet.cpp # src/wallet/test/crypto_tests.cpp # src/wallet/wallet.cpp # src/wallet/wallet.h # src/wallet/walletdb.cpp # test/functional/fundrawtransaction.py # test/functional/import-rescan.py # test/functional/merkle_blocks.py # test/functional/multi_rpc.py # test/functional/p2p-instantsend.py # test/functional/sporks.py # test/functional/test_framework/comptool.py # test/functional/test_framework/mininode.py # test/functional/test_framework/util.py # test/functional/wallet-hd.py # test/functional/wallet.py
FornaxA
pushed a commit
to ioncoincore/ion
that referenced
this pull request
Jul 6, 2020
fa6c3de p2p: Clarify control flow in ProcessMessage() (MarcoFalke) Pull request description: `ProcessMessage` is effectively a massive switch case construct. In the past there were attempts to clarify the control flow in `ProcessMessage()` by moving each case into a separate static function (see bitcoin#9608). It was closed because it wasn't clear if moving each case into a function was the right approach. Though, we can quasi treat each case as a function by adding a return statement to each case. (Can be seen as a continuation of bugfix bitcoin#13162) This patch does exactly that. Also note that this patch is a subset of previous approaches such as bitcoin#9608 and bitcoin#10145. Review suggestion: `git diff HEAD~ --function-context` Tree-SHA512: 91f6106840de2f29bb4f10d27bae0616b03a91126e6c6013479e1dd79bee53f22a78902b631fe85517dd5dc0fa7239939b4fefc231851a13c819458559f6c201 Signed-off-by: cevap <dev@i2pmail.org>
FornaxA
pushed a commit
to ioncoincore/ion
that referenced
this pull request
Jul 6, 2020
… are unknown. fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b Signed-off-by: cevap <dev@i2pmail.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reject messages are logged to debug.log if NET debug logging is enabled.
Because of the way the
ProcessMessages()
function is structured,processing for REJECT messages will also drop through to the default
branch and incorrectly log
Unknown command "reject" from peer-?
. Fixthat by exiting from
ProcessMessages()
early.without this PR:
with this PR: