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

Merge #18533: scripted-diff: Replace strCommand with msg_type #4761

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

vijaydasmp
Copy link

@vijaydasmp vijaydasmp commented Apr 10, 2022

scripted-diff: Merge bitcoin#18533 Replace strCommand with msg_type

-BEGIN VERIFY SCRIPT-
sed -i 's/<strCommand>/msg_type/g' src/coinjoin/client.cpp
sed -i 's/<strCommand>/msg_type/g' src/coinjoin/client.h
sed -i 's/<strCommand>/msg_type/g' src/coinjoin/server.cpp
sed -i 's/<strCommand>/msg_type/g' src/coinjoin/server.h
sed -i 's/<strCommand>/msg_type/g' src/evo/mnauth.cpp
sed -i 's/<strCommand>/msg_type/g' src/evo/mnauth.h
sed -i 's/<strCommand>/msg_type/g' src/governance/governance.cpp
sed -i 's/<strCommand>/msg_type/g' src/governance/governance.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/blockprocessor.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/blockprocessor.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/chainlocks.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/chainlocks.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/dkgsessionhandler.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/dkgsessionhandler.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/dkgsessionmgr.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/dkgsessionmgr.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/instantsend.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/instantsend.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/quorums.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/quorums.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/signing.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/signing.h
sed -i 's/<strCommand>/msg_type/g' src/llmq/signing_shares.cpp
sed -i 's/<strCommand>/msg_type/g' src/llmq/signing_shares.h
sed -i 's/<strCommand>/msg_type/g' src/masternode/sync.cpp
sed -i 's/<strCommand>/msg_type/g' src/masternode/sync.h
sed -i 's/<strCommand>/msg_type/g' src/net_processing.cpp
sed -i 's/<strCommand>/msg_type/g' src/spork.cpp
sed -i 's/<strCommand>/msg_type/g' src/spork.h
-END VERIFY SCRIPT-

@PastaPastaPasta
Copy link
Member

PastaPastaPasta commented Apr 10, 2022

commit should begin with scripted-diff: smth like

scripted-diff: Merge #18533 Replace strCommand with msg_type

And then the body of the scripted diff needs to be correct too see 0e94899

@vijaydasmp
Copy link
Author

Updated commit message and the body of the scripted diff

@UdjinM6
Copy link

UdjinM6 commented Apr 11, 2022

Should add an empty line between a commit title ("scripted-diff:...") and a commit description ("-BEGIN VERIFY...") to make it work (see https://github.com/dashpay/dash/commit/0bfc69274cf88d5b0fa0436cfca68d2f8c6f2e5f.patch vs https://gitlab.com/UdjinM6/dash/-/commit/736cfaa1f4feaa40cef7b073fb3d200a46b4491f.patch)

@github-actions
Copy link

This pull request has conflicts, please rebase.

@vijaydasmp
Copy link
Author

got it, Thanks @UdjinM6

@vijaydasmp vijaydasmp force-pushed the bp2006 branch 2 times, most recently from 50d076d to 0f16c50 Compare April 15, 2022 07:33
@vijaydasmp vijaydasmp marked this pull request as ready for review April 15, 2022 09:50
@PastaPastaPasta
Copy link
Member

DNM until after #4752 is merged

@github-actions
Copy link

This pull request has conflicts, please rebase.

@UdjinM6
Copy link

UdjinM6 commented Apr 16, 2022

diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index ef093c4..6f22fff 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -3937,7 +3937,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStrea
         return true;
     }
 
-    if (strCommand == NetMsgType::GETQUORUMROTATIONINFO) {
+    if (msg_type == NetMsgType::GETQUORUMROTATIONINFO) {
         llmq::CGetQuorumRotationInfo cmd;
         vRecv >> cmd;
 
@@ -3954,7 +3954,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStrea
         return true;
     }
 
-    if (strCommand == NetMsgType::QUORUMROTATIONINFO) {
+    if (msg_type == NetMsgType::QUORUMROTATIONINFO) {
         // we have never requested this
         LOCK(cs_main);
         Misbehaving(pfrom->GetId(), 100, strprintf("received not-requested quorumrotationinfo. peer=%d", pfrom->GetId()));

-BEGIN VERIFY SCRIPT-
sed -i 's/\<strCommand\>/msg_type/g' src/coinjoin/client.cpp
sed -i 's/\<strCommand\>/msg_type/g' src/coinjoin/client.h
sed -i 's/\<strCommand\>/msg_type/g'  src/coinjoin/server.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/coinjoin/server.h
sed -i 's/\<strCommand\>/msg_type/g'  src/evo/mnauth.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/evo/mnauth.h
sed -i 's/\<strCommand\>/msg_type/g'  src/governance/governance.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/governance/governance.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/blockprocessor.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/blockprocessor.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/chainlocks.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/chainlocks.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionhandler.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionhandler.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionmgr.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionmgr.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/instantsend.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/instantsend.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/quorums.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/quorums.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing_shares.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing_shares.h
sed -i 's/\<strCommand\>/msg_type/g'  src/masternode/sync.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/masternode/sync.h
sed -i 's/\<strCommand\>/msg_type/g'  src/net_processing.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/spork.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/spork.h
-END VERIFY SCRIPT-
@vijaydasmp
Copy link
Author

Thanks @UdjinM6 just fixed it

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, utACK

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK for squash merge

Note: I put this on v19 milestone, and as a v18 backport @UdjinM6 please change if you disagree with those

@PastaPastaPasta PastaPastaPasta merged commit c66a2ec into dashpay:develop Apr 18, 2022
@UdjinM6 UdjinM6 modified the milestones: 19, 18 Apr 19, 2022
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Aug 19, 2024
…ashpay#4761)

-BEGIN VERIFY SCRIPT-
sed -i 's/\<strCommand\>/msg_type/g' src/coinjoin/client.cpp
sed -i 's/\<strCommand\>/msg_type/g' src/coinjoin/client.h
sed -i 's/\<strCommand\>/msg_type/g'  src/coinjoin/server.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/coinjoin/server.h
sed -i 's/\<strCommand\>/msg_type/g'  src/evo/mnauth.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/evo/mnauth.h
sed -i 's/\<strCommand\>/msg_type/g'  src/governance/governance.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/governance/governance.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/blockprocessor.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/blockprocessor.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/chainlocks.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/chainlocks.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionhandler.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionhandler.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionmgr.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/dkgsessionmgr.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/instantsend.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/instantsend.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/quorums.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/quorums.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing.h
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing_shares.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/llmq/signing_shares.h
sed -i 's/\<strCommand\>/msg_type/g'  src/masternode/sync.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/masternode/sync.h
sed -i 's/\<strCommand\>/msg_type/g'  src/net_processing.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/spork.cpp
sed -i 's/\<strCommand\>/msg_type/g'  src/spork.h
-END VERIFY SCRIPT-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants