MCPcopy Create free account
hub / github.com/DNAProject/DNA / Append

Method Append

vm/neovm/types/array_value.go:39–45  ·  view source on GitHub ↗
(item VmValue)

Source from the content-addressed store, hash-verified

37}
38
39func (self *ArrayValue) Append(item VmValue) error {
40 if len(self.Data) >= constants.MAX_ARRAY_SIZE {
41 return errors.ERR_OVER_MAX_ARRAY_SIZE
42 }
43 self.Data = append(self.Data, item)
44 return nil
45}
46
47func (self *ArrayValue) Len() int64 {
48 return int64(len(self.Data))

Callers 10

newVmValueFunction · 0.95
ExecuteOpMethod · 0.95
PushAsArrayMethod · 0.95
buildArrayFunction · 0.95
TestNewArrayFunction · 0.95
TestArrayValue_RemoveAtFunction · 0.95
TestVerifySigFunction · 0.95

Calls

no outgoing calls

Tested by 8

newVmValueFunction · 0.76
buildArrayFunction · 0.76
TestNewArrayFunction · 0.76
TestArrayValue_RemoveAtFunction · 0.76
TestVerifySigFunction · 0.76