Skip to content
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

Adjust the Charge for Storage Writting #1441

Merged
merged 60 commits into from
Mar 13, 2020
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
805d370
Rebase
lock9 Dec 16, 2019
21ced64
Refactor, more tests
lock9 Dec 17, 2019
a376c48
Discarding changes
lock9 Dec 17, 2019
0239d04
Fixes, tests and refactor
lock9 Dec 19, 2019
92b256a
Calculating final fee during onPersist
lock9 Dec 19, 2019
26c50fa
Rebase
lock9 Dec 19, 2019
1fb19e4
dotnet format + missing change
lock9 Dec 19, 2019
daa4e2b
Minor improvements
lock9 Dec 19, 2019
42c6dd3
fix
lock9 Dec 19, 2019
c2aa683
Removing empty lines
lock9 Dec 19, 2019
cb33f47
add comment
eryeer Feb 6, 2020
50762dc
merge conflict
eryeer Feb 6, 2020
6238206
remove checkStorageContext
eryeer Feb 6, 2020
a600683
update ut
eryeer Feb 6, 2020
b5b0fb4
revert modification
eryeer Feb 7, 2020
96aca15
revert
eryeer Feb 7, 2020
5074592
add recycle reward gas
eryeer Feb 7, 2020
764c67d
update
eryeer Feb 7, 2020
54efe6a
fix ut
eryeer Feb 7, 2020
3174c0d
fix
eryeer Feb 7, 2020
51643d7
add OnRecycleRewardGas test
eryeer Feb 7, 2020
7131999
optimise
eryeer Feb 10, 2020
b5dac3d
update
eryeer Feb 10, 2020
1da5ebf
optimise
eryeer Feb 11, 2020
3996853
Merge branch 'master' into storage-payback
eryeer Feb 11, 2020
dfc3d7a
Removing extra space
vncoelho Feb 11, 2020
a856d44
update comment
eryeer Feb 12, 2020
ddac1f5
update static
eryeer Feb 12, 2020
5c61cbd
format
eryeer Feb 12, 2020
cbb8531
revert virtual
eryeer Feb 14, 2020
c661c41
format
eryeer Feb 14, 2020
1bf3815
update
eryeer Feb 18, 2020
5be0d71
remove ThrowIfNot
eryeer Feb 18, 2020
3d21376
update TryGet and engine notify
eryeer Feb 19, 2020
938af95
format
eryeer Feb 19, 2020
c39bb89
format
eryeer Feb 19, 2020
b8a6824
Update ApplicationEngine.cs
shargon Feb 19, 2020
ca9ab68
update mint
eryeer Feb 20, 2020
1196f86
Merge branch 'storage-payback' of github.com:eryeer/neoUT into storag…
eryeer Feb 20, 2020
d233346
format
eryeer Feb 20, 2020
e7c5d23
Fix typo
shargon Feb 20, 2020
e567bd3
Simplify
shargon Feb 20, 2020
45eaf5e
Merge branch 'master' into storage-payback
eryeer Feb 21, 2020
8eb8cf4
Merge branch 'master' into storage-payback
eryeer Feb 27, 2020
ed1d0d6
Merge branch 'master' into storage-payback
eryeer Feb 28, 2020
7134701
reset, charge only for increment of data, add put basic fee
Mar 3, 2020
1cd0e25
fix ut
Mar 3, 2020
7b0ad73
fix ut
Mar 3, 2020
d638d5c
Merge branch 'master' into storage-payback
Mar 4, 2020
0fe0c2e
Clean
shargon Mar 4, 2020
0e0b63c
add throw in GetStoragePrice if non-interface
Mar 5, 2020
bec4313
Merge branch 'storage-payback' of https://github.com/eryeer/neoUT int…
Mar 5, 2020
a4893df
fix ut
Mar 5, 2020
8acfe41
Merge branch 'master' into storage-payback
eryeer Mar 10, 2020
ffad20a
fix GetPrice parameters
Mar 11, 2020
c9e6b7a
Merge branch 'master' into storage-payback
Mar 12, 2020
2b1939e
Update InteropService.Storage.cs
erikzhang Mar 12, 2020
d683efd
add check: skeyValue.Value is null
Mar 12, 2020
073849f
reset, fix ut
Mar 12, 2020
5242131
adjust Storage.Delete price = 1 * GasPerByte
Mar 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/neo/SmartContract/InteropService.Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private static long GetStoragePrice(EvaluationStack stack, StoreView snapshot)
Key = key.GetSpan().ToArray()
};
var skeyValue = snapshot.Storages.TryGet(skey);
if (skeyValue is null)
if (skeyValue is null || skeyValue.Value is null)
erikzhang marked this conversation as resolved.
Show resolved Hide resolved
newDataSize += key.GetByteLength();
else if (newDataSize <= skeyValue.Value.Length)
newDataSize = 1;
Expand Down