-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Fixes RequestManager handling and adding of the 'data' listener #3156
Conversation
… of a setRequestManager method
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.
Fixes the warning which is awesome. 💯 💯
Is there anyway to get the diff into a state where only the meaningful logic changes are represented before going over for a quick second pass?
@cgewecke Because those code style improvements are made within commits with actually fixes is it really hard to remove those changes. I will not do such changes to newly proposed PRs. Thanks for the hint! |
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.
This will take some time to review, it touches some of the most sensitive logic at Web3. The original design seems a little unusual. I think we need to go through the git blame and make sure we understand why it's currently like this.
@nivida Did you ever discuss the RequestManager logic with Frozeman? Do you remember what his views about it were?
@frozeman Just pinging you here in case you might remember running into any specific difficulties or design questions around how the RequestManager and setProvider are hooked together. Do you have any ideas for things to test / double-check? |
Without reading all the comments. One reason why I made it this way, was so that certain modules can have a storage privet from the global one. Eg. Swarm or whisper can (did) run on separate binaries, and Providers. |
I've went through anything and wrote the logic shortly down on paper to be sure I'm not breaking anything during fixing it.
I've discussed this logic around a year ago and the rule was that child modules do inherit the providers from their parents. This means that providers and default options a module can have do overwrite the values of the child modules when a new value/provider got set but not vice versa.
Yep, this is the implemented logic. 👌 @cgewecke |
Yes! I understand this - it's good. I would still like to take a block of time to look through this a bit to think about it, sorry... |
Moved this fix to #3190 |
Fixes #1648, #3042
Descriptions
Fixes the
MaxEventListener
issue with adding of thesetRequestManager
function to all packages. The provider will now only get resolved once and thedata
listener is no longer added on each initiation of aModule
,Contract
, or on executing of thesetProvider
method on each package.Old Behaviour
setProvider
.data
listener.setProvider
on all children's.data
listener for each child package.New Behaviour
setProvider
.data
listener.setRequestManager
on all children's.