fix: reset_network to correctly reset time info#513
Conversation
|
Hmmm, I'm not sure about this. When you first start a surfnet, the epoch info will come from the mainnet datasource. Now, we're clearing it out to zero. I'm not sure what the expected behavior should be, one of these:
I'm of the opinion that we should go with option 2. Thoughts, @bonlime, @lgalabru? |
|
that's a good point, I personally would go with option 3, since it would be closer to "full reset", I'll see if it's easy enough to do |
|
I'd go with option 3 when the surfnet has a datasource, and keep option 1 when the surfnet is |
|
Okay, sounds good. Let's go with option 3, @bonlime. Thanks! |
|
Hey, @bonlime, just checking in - do you think you'll have time to get this over the finish line? |
|
Hey, i've tried to implement this, but struggled with rust async, since i'm not very proficient with it... if you could implement it, it probably would be faster |
|
hey @bonlime, thanks for your contribution! |
|
@lgalabru I've tried. The problem is that it requires changing previously sync functions to async to allow for rpc requests, in multiple attempts I did it resulted in pretty significant functions signatures changed, so I threw it away. it definitely needs some guided input from a person much better in both rust and this code base |
Fixes #511
Tests were vibed so if you think it's a little verbose, can shorten them