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
Refactor fRelayTxes global to CConnman member #10915
Conversation
@@ -130,6 +130,7 @@ class CConnman | |||
|
|||
struct Options | |||
{ | |||
bool m_relay_txes = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the different initial value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly because of this: #10596 (comment)
Personally, I also slightly prefer to put the correct default here, but it does not matter much as it gets overwritten anyway.
@@ -351,6 +354,7 @@ class CConnman | |||
unsigned int nSendBufferMaxSize; | |||
unsigned int nReceiveFloodSize; | |||
|
|||
bool m_relay_txes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing initial value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed? It gets set during Start()
and isn't used before. Or is it a matter of good form?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some future refactor can call GetRelayTxes
(or other) before Start()
and there is no way to know/prevent that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Done.
Suggestion, rename PR and commit to |
@promag thx for the review. I rewrote the commit msg as you suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 9c830bf.
@@ -351,6 +354,7 @@ class CConnman | |||
unsigned int nSendBufferMaxSize; | |||
unsigned int nReceiveFloodSize; | |||
|
|||
bool m_relay_txes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some future refactor can call GetRelayTxes
(or other) before Start()
and there is no way to know/prevent that.
ping @theuni |
Rebased. |
Err.. I'd rather not, as this really needs to be a member of the message processor instead. We'll likely start moving in that direction after #10756 goes in. @TheBlueMatt agreed? |
Yea, we should be moving fRelayTxes towards net_processing, not net, sorry for the churn in this area. |
No description provided.