MCPcopy Create free account
hub / github.com/chain/txvm / opInt

Function opInt

protocol/txvm/data.go:104–113  ·  view source on GitHub ↗
(vm *VM)

Source from the content-addressed store, hash-verified

102}
103
104func opInt(vm *VM) {
105 a := vm.popBytes()
106 res, n := binary.Uvarint(a)
107 if n <= 0 {
108 panic(errors.WithData(ErrInt, "int", a))
109 }
110 // Note: if res > math.MaxInt64, this will convert it to a negative
111 // number. This is intentional!
112 vm.push(Int(res))
113}

Callers

nothing calls this directly

Calls 4

WithDataFunction · 0.92
IntTypeAlias · 0.85
popBytesMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected