Merge pull request #9509 from filecoin-project/gstuart/fvm-debug-bundles
fix: fvm: Allow setting local bundles for Debug FVM for av 9+
This commit is contained in:
commit
9a474c759b
@ -39,7 +39,6 @@ import (
|
|||||||
|
|
||||||
var _ Interface = (*FVM)(nil)
|
var _ Interface = (*FVM)(nil)
|
||||||
var _ ffi_cgo.Externs = (*FvmExtern)(nil)
|
var _ ffi_cgo.Externs = (*FvmExtern)(nil)
|
||||||
var debugBundleV8path = os.Getenv("LOTUS_FVM_DEBUG_BUNDLE_V8")
|
|
||||||
|
|
||||||
type FvmExtern struct {
|
type FvmExtern struct {
|
||||||
Rand
|
Rand
|
||||||
@ -418,12 +417,10 @@ func NewDebugFVM(ctx context.Context, opts *VMOpts) (*FVM, error) {
|
|||||||
return nil, xerrors.Errorf("error determining actors version for network version %d: %w", opts.NetworkVersion, err)
|
return nil, xerrors.Errorf("error determining actors version for network version %d: %w", opts.NetworkVersion, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch av {
|
debugBundlePath := os.Getenv(fmt.Sprintf("LOTUS_FVM_DEBUG_BUNDLE_V%d", av))
|
||||||
case actorstypes.Version8:
|
if debugBundlePath != "" {
|
||||||
if debugBundleV8path != "" {
|
if err := createMapping(debugBundlePath); err != nil {
|
||||||
if err := createMapping(debugBundleV8path); err != nil {
|
log.Errorf("failed to create v%d debug mapping", av)
|
||||||
log.Errorf("failed to create v8 debug mapping")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user