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

Function opPeek

protocol/txvm/stack.go:114–122  ·  view source on GitHub ↗
(vm *VM)

Source from the content-addressed store, hash-verified

112}
113
114func opPeek(vm *VM) {
115 n := int64(vm.popInt())
116 item, ok := vm.peekNth(n).(Data)
117 if !ok {
118 panic(errors.WithData(ErrType, "want", "Data"))
119 }
120 vm.chargeCopy(item)
121 vm.push(item)
122}

Callers

nothing calls this directly

Calls 5

WithDataFunction · 0.92
popIntMethod · 0.80
peekNthMethod · 0.80
chargeCopyMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected