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:
Geoff Stuart 2022-11-04 09:29:36 -04:00 committed by GitHub
commit 9a474c759b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,6 @@ import (
var _ Interface = (*FVM)(nil)
var _ ffi_cgo.Externs = (*FvmExtern)(nil)
var debugBundleV8path = os.Getenv("LOTUS_FVM_DEBUG_BUNDLE_V8")
type FvmExtern struct {
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)
}
switch av {
case actorstypes.Version8:
if debugBundleV8path != "" {
if err := createMapping(debugBundleV8path); err != nil {
log.Errorf("failed to create v8 debug mapping")
}
debugBundlePath := os.Getenv(fmt.Sprintf("LOTUS_FVM_DEBUG_BUNDLE_V%d", av))
if debugBundlePath != "" {
if err := createMapping(debugBundlePath); err != nil {
log.Errorf("failed to create v%d debug mapping", av)
}
}