diff --git a/pkg/core/mpt/compat_test.go b/pkg/core/mpt/compat_test.go index ac99515de..f83273e80 100644 --- a/pkg/core/mpt/compat_test.go +++ b/pkg/core/mpt/compat_test.go @@ -38,11 +38,14 @@ func prepareMPTCompat() *Trie { // TestCompatibility contains tests present in C# implementation. // https://github.com/neo-project/neo-modules/blob/master/tests/Neo.Plugins.StateService.Tests/MPT/UT_MPTTrie.cs // There are some differences, though: -// 1. In our implementation delete is silent, i.e. we do not return an error is the key is missing. +// 1. In our implementation delete is silent, i.e. we do not return an error is the key is missing or empty. // However, we do return error when contents of hash node are missing from the store // (corresponds to exception in C# implementation). -// 2. If `GetProof` key is missing from the trie, we return error, while C# node just returns empty proof -// with no exception. +// 2. In our implementation put returns error if something goes wrong, while C# implementation throws +// an exception and returns nothing. +// 3. In our implementation get does not immediately return error in case of an empty key. An error is returned +// only if value is missing from the storage. C# implementation checks that key is not empty and throws an error +// otherwice. func TestCompatibility(t *testing.T) { mainTrie := prepareMPTCompat()