Conversation
src/Neo/Persistence/ClonedCache.cs
Outdated
| protected override void UpdateInternal(StorageKey key, StorageItem value) | ||
| { | ||
| innerCache.GetAndChange(key).FromReplica(value); | ||
| _innerCache.GetAndChange(key)?.FromReplica(value); |
There was a problem hiding this comment.
This fail before, is this expected?
There was a problem hiding this comment.
This fail before, is this expected?
I think it should be a bug.
There was a problem hiding this comment.
I don't understand why SnapshotCache read from store, but write if the snapshot exists...
There was a problem hiding this comment.
Because I want to avoid logic changes in this PR, I will throw a different exception, taking a look to the code it seems that it should always exists or it's a failure
Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com>
Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com>
Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com>
…into storage-nullable
Co-authored-by: Christopher Schuchardt <cschuchardt88@gmail.com>
Co-authored-by: nan01ab <yjcc201374@outlook.com>
…into storage-nullable
|
@neo-project/core could you take a look to this one please |
| if (seek_prefix == null) | ||
| { | ||
| throw new ArgumentException(); | ||
| throw new ArgumentException($"{nameof(key_prefix)} with all bytes being 0xff is not supported now"); |
There was a problem hiding this comment.
Why is all 0xff not support? Then SeekDirection should be only Forward and removed from the parameters of this function.
You need 0xff to go Backward for SeekDirection. ApplicationLogs uses this method. However I used IStore interface to do what this can't do. If you can explain whats the problem. I can fix it.
There was a problem hiding this comment.
Why is all
0xffnot support? ThenSeekDirectionshould be onlyForwardand removed from the parameters of this function.You need
0xffto goBackwardforSeekDirection.ApplicationLogsuses this method. However I usedIStoreinterface to do what this can't do. If you can explain whats the problem. I can fix it.
I have a fix, waiting for this PR to merge.
|
@nan01ab PR has been merge please add your PR for the |
* master: (43 commits) Fix `GetAndChange` warnings (neo-project#3702) `Murmur3` should not be cryptographic hash algorithm (neo-project#3668) Test: add tests for native contract id (neo-project#3697) Update nugets (neo-project#3692) [Core P2P] fix the bug (neo-project#3695) Add hardfork HF_Echidna (neo-project#3454) Fix: add lock for RocksDbStore.Snapshot to keep same behavior as MemoryStore and LevelDbStore (neo-project#3689) Nullable rocks db (neo-project#3686) Nullable leveldb (neo-project#3685) Enforcement Compiler Warnings (neo-project#3687) [`Update`] Dotnet & Compiler Version (neo-project#3684) [`Add`]: LevelDB Benchmarks (neo-project#3667) [`Fix`]: Behavior when `keyPrefix` is null in different `IStore.Seek` impls. (neo-project#3682) Improve calculatenetworkfee (neo-project#3674) more 2025 (neo-project#3678) Nullable in Storage classes (neo-project#3670) readonly (neo-project#3676) [Fix] Set max entries for `VerifyProof` in `statePlugin` (neo-project#3675) Neo.json.benchmarks (neo-project#3673) Happy new year 2025 (neo-project#3677) ... # Conflicts: # src/Neo/Neo.csproj # src/Neo/ProtocolSettings.cs # src/Neo/SmartContract/ApplicationEngine.cs # src/Neo/SmartContract/Native/NeoToken.cs # src/Neo/SmartContract/Native/RoleManagement.cs # tests/Neo.UnitTests/SmartContract/Native/UT_NativeContract.cs
Description
Required for #3669
These changes are required for #3669, was found some errors with nullables, and it require to be solved first
Fixes # (issue)
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: