-
Notifications
You must be signed in to change notification settings - Fork 479
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
Trie RlpStreams as structs #6584
Conversation
@@ -673,9 +673,12 @@ public void ReadOnly_store_returns_copies(bool pruning) | |||
readOnlyNode.Should().NotBe(originalNode); | |||
readOnlyNode.Should().BeEquivalentTo(originalNode, | |||
eq => eq.Including(t => t.Keccak) | |||
.Including(t => t.RlpStream) |
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.
Isn't happy with ref
items so rearranged to test this bit below
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.
lookgs good, but lets wait for @asdacap to also take a look
|
||
namespace Nethermind.Serialization.Rlp | ||
{ | ||
public class RlpFactory |
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.
would it make sense to make it struct?
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.
Is class to have atomic writes on the CappedArray<byte>
struct; which is {byte[],int}
which otherwise could cause a concurrent reader to read the array but a different length from an earlier write for example; because the two items are not written atomicly.
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.
Third RLP decoder type though. Thats unfortunate.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing