-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Fixes RequestManager handling and adding of the 'data' listener #3156
Conversation
… of a setRequestManager method
cgewecke
left a comment
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! |
cgewecke
left a comment
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
MaxEventListenerissue with adding of thesetRequestManagerfunction to all packages. The provider will now only get resolved once and thedatalistener is no longer added on each initiation of aModule,Contract, or on executing of thesetProvidermethod on each package.Old Behaviour
setProvider.datalistener.setProvideron all children's.datalistener for each child package.New Behaviour
setProvider.datalistener.setRequestManageron all children's.