Merge pull request #996 from filecoin-project/fix/yet-anothur-fork-issue

Fix withUpdates
This commit is contained in:
Łukasz Magiera 2019-12-20 13:18:04 +01:00 committed by GitHub
commit 7c925db748
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import "fmt"
var CurrentCommit string
// BuildVersion is the local build version, set by build system
const BuildVersion = "0.1.4"
const BuildVersion = "0.1.5"
var UserVersion = BuildVersion + CurrentCommit
@ -31,7 +31,7 @@ func (ve Version) EqMajorMinor(v2 Version) bool {
}
// APIVersion is a semver version of the rpc api exposed
var APIVersion Version = newVer(0, 1, 4)
var APIVersion Version = newVer(0, 1, 5)
const (
majorMask = 0xff0000

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()