diff --git a/core/compatibility.go b/core/compatibility.go index e57e1800d..66210863f 100644 --- a/core/compatibility.go +++ b/core/compatibility.go @@ -173,13 +173,13 @@ const ( TestNetWsResetRecordDependencyHeight uint64 = 281800 // TestNetV8JSLibVersionControlHeight - TestNetV8JSLibVersionControlHeight uint64 = 424300 + TestNetV8JSLibVersionControlHeight uint64 = 424400 //TestNetTransferFromContractFailureEventRecordableHeight - TestNetTransferFromContractFailureEventRecordableHeight uint64 = 424300 + TestNetTransferFromContractFailureEventRecordableHeight uint64 = 424400 //TestNetNewNvmExeTimeoutConsumeGasHeight - TestNetNewNvmExeTimeoutConsumeGasHeight uint64 = 424300 + TestNetNewNvmExeTimeoutConsumeGasHeight uint64 = 424400 ) // var for TestNet diff --git a/nf/nvm/module.go b/nf/nvm/module.go index 2f3967e9f..d7a608b25 100644 --- a/nf/nvm/module.go +++ b/nf/nvm/module.go @@ -145,8 +145,8 @@ func AttachLibVersionDelegateFunc(handler unsafe.Pointer, require *C.char) *C.ch logging.VLog().WithFields(logrus.Fields{ "libname": libname, "height": e.ctx.block.Height(), - }).Error("e.context.contract.ContractMeta is nil.") - return nil + }).Debug("e.context.contract.ContractMeta is nil.") + return attachDefaultVersionLib(libname) } cv := e.ctx.contract.ContractMeta().Version @@ -179,6 +179,10 @@ func AttachLibVersionDelegateFunc(handler unsafe.Pointer, require *C.char) *C.ch return C.CString(JSLibRootName + ver + libname[JSLibRootNameLen-1:]) } + return attachDefaultVersionLib(libname) +} + +func attachDefaultVersionLib(libname string) *C.char { // block created before core.V8JSLibVersionControlHeight, default lib version: 1.0.0 if !strings.HasPrefix(libname, JSLibRootName) { if strings.HasPrefix(libname, "/") {