diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index 5191d3fce..4c16af02e 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -134,7 +134,7 @@ func CompileAndSave(src string, o *Options) ([]byte, error) { } if o.ManifestFile != "" { - m, err := di.convertToManifest(o.ContractFeatures) + m, err := di.ConvertToManifest(o.ContractFeatures) if err != nil { return b, errors.Wrap(err, "failed to convert debug info to manifest") } diff --git a/pkg/compiler/debug.go b/pkg/compiler/debug.go index 352ad0b85..ebf5a3e61 100644 --- a/pkg/compiler/debug.go +++ b/pkg/compiler/debug.go @@ -338,9 +338,9 @@ func parsePairJSON(data []byte, sep string) (string, string, error) { return ss[0], ss[1], nil } -// convertToManifest converts contract to the manifest.Manifest struct for debugger. +// ConvertToManifest converts contract to the manifest.Manifest struct for debugger. // Note: manifest is taken from the external source, however it can be generated ad-hoc. See #1038. -func (di *DebugInfo) convertToManifest(fs smartcontract.PropertyState) (*manifest.Manifest, error) { +func (di *DebugInfo) ConvertToManifest(fs smartcontract.PropertyState) (*manifest.Manifest, error) { var ( mainNamespace string err error diff --git a/pkg/compiler/debug_test.go b/pkg/compiler/debug_test.go index f76f09cde..0a7f8cbb8 100644 --- a/pkg/compiler/debug_test.go +++ b/pkg/compiler/debug_test.go @@ -127,7 +127,7 @@ func unexportedMethod() int { return 1 } } t.Run("convert to Manifest", func(t *testing.T) { - actual, err := d.convertToManifest(smartcontract.HasStorage) + actual, err := d.ConvertToManifest(smartcontract.HasStorage) require.NoError(t, err) // note: offsets are hard to predict, so we just take them from the output expected := &manifest.Manifest{