core/state: remove IsConst
from StorageItem
This commit is contained in:
parent
df041b8031
commit
fd4174ad31
10 changed files with 10 additions and 86 deletions
|
@ -38,16 +38,6 @@ const (
|
|||
PickField1 FindFlags = 1 << 5
|
||||
)
|
||||
|
||||
// PutFlags represents flag of `PutEx` syscall.
|
||||
type PutFlags byte
|
||||
|
||||
const (
|
||||
// PutDefault is a storage flag for non-constant items.
|
||||
PutDefault PutFlags = 0
|
||||
// PutConstant is a storage flag for constant items.
|
||||
PutConstant PutFlags = 0x01
|
||||
)
|
||||
|
||||
// ConvertContextToReadOnly returns new context from the given one, but with
|
||||
// writing capability turned off, so that you could only invoke Get and Find
|
||||
// using this new Context. If Context is already read-only this function is a
|
||||
|
@ -79,15 +69,6 @@ func Put(ctx Context, key interface{}, value interface{}) {
|
|||
neogointernal.Syscall3NoReturn("System.Storage.Put", ctx, key, value)
|
||||
}
|
||||
|
||||
// PutEx is an advanced version of Put which saves given value with given key
|
||||
// and given ReadOnly flag in the storage using given Context. `flag` argument
|
||||
// can either be odd for constant storage items or even for variable storage items.
|
||||
// Refer to Put function description for details on how to pass the remaining
|
||||
// arguments. This function uses `System.Storage.PutEx` syscall.
|
||||
func PutEx(ctx Context, key interface{}, value interface{}, flag PutFlags) {
|
||||
neogointernal.Syscall4NoReturn("System.Storage.PutEx", ctx, key, value, flag)
|
||||
}
|
||||
|
||||
// Get retrieves value stored for the given key using given Context. See Put
|
||||
// documentation on possible key and value types. If the value is not present in
|
||||
// the database it returns nil. This function uses `System.Storage.Get` syscall.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue