MCPcopy Index your code
hub / github.com/chain/Core / opWithin

Function opWithin

protocol/vm/numeric.go:441–459  ·  view source on GitHub ↗
(vm *virtualMachine)

Source from the content-addressed store, hash-verified

439}
440
441func opWithin(vm *virtualMachine) error {
442 err := vm.applyCost(4)
443 if err != nil {
444 return err
445 }
446 max, err := vm.popInt64(true)
447 if err != nil {
448 return err
449 }
450 min, err := vm.popInt64(true)
451 if err != nil {
452 return err
453 }
454 x, err := vm.popInt64(true)
455 if err != nil {
456 return err
457 }
458 return vm.pushBool(x >= min && x < max, true)
459}

Callers

nothing calls this directly

Calls 3

applyCostMethod · 0.80
popInt64Method · 0.80
pushBoolMethod · 0.80

Tested by

no test coverage detected