Closed sideninja closed 1 month ago
This change introduces concurrency control to the EVM
struct in the services/requester/requester.go
file. By adding a mutex, the code ensures that methods manipulating shared resources, particularly during transaction building and signing, are thread-safe. This enhancement minimizes the risk of race conditions by locking critical sections, allowing multiple goroutines to operate without conflict, thus improving the robustness of the EVM
functionality.
File Path | Change Summary |
---|---|
services/requester/requester.go | Added a mutex to the EVM struct for concurrency control; modified buildTransaction to ensure thread-safe operations by locking and unlocking the mutex. |
🐇 In the meadow where bunnies play,
A mutex now keeps race conditions at bay.
With locks in place, we dance and cheer,
Safe transactions bring us near!
So hop along, with code so bright,
TheEVM
shines, a joyful sight! ✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
In an edge case during multiple transactions submitted there could be a conflict between calling
PublicKey
andSign
which would produce invalid signature. This was observed couple of times on previewnet and this lock should address the issue.For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes