Fix withUpdates

This commit is contained in:
Łukasz Magiera 2019-12-20 09:31:59 +01:00
parent 8f1c2b7aa9
commit e3a22d2027

View File

@ -26,12 +26,12 @@ func withUpdates(updates ...update) interface{} {
vmctx := args[1].Interface().(types.VMContext)
for _, u := range updates {
if u.start >= vmctx.BlockHeight() {
if vmctx.BlockHeight() >= u.start {
return reflect.ValueOf(u.method).Call(args)
}
}
return reflect.ValueOf(notFound(vmctx)).Call([]reflect.Value{args[1]})
return reflect.ValueOf(notFound(vmctx)).Call([]reflect.Value{})
})
return out.Interface()