Merge pull request #996 from filecoin-project/fix/yet-anothur-fork-issue
Fix withUpdates
This commit is contained in:
commit
7c925db748
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user