-
Notifications
You must be signed in to change notification settings - Fork 278
[master] ZIL-5332-debug_accountRange #3760
base: master
Are you sure you want to change the base?
Conversation
} | ||
|
||
void AccountStore::PrintAddressCache(){ | ||
for (const std::array<unsigned char, 40>& entry : m_cache) { |
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.
PrintAddressCache should probably lock the mutex as it may be possible for another thread to change the cache and invalidate the iterator, if there is only one thread then it possibly does not need a mutex.
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.
If you can add a test to the EvmAcceptanceTests we can take it on board and this test will be executed via ci.
Need to make sure it only looks for short durations and that it doesn't use excessive memory, apart from that it should be OK.
If you provide a test we will test it out as part of our current schedule.
9392d3d
to
c51f10c
Compare
This pull request will add the functionality of debug_accountRange which will return a pagination style response of addresses in the network.
The idea is to implement a cache (an array) which will contain address hexes (still to be determined) which can then be indexed into a slice of the array returned (or also include the corresponding account information).
Potential Discussions:
debug_accountRange
call?