Skip to content

Commit

Permalink
Allow setting local bundles for Debug FVM for av 9+
Browse files Browse the repository at this point in the history
  • Loading branch information
geoff-vball committed Oct 18, 2022
1 parent 8a2f8c3 commit cdd7f26
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions chain/vm/fvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}

Expand Down

0 comments on commit cdd7f26

Please sign in to comment.