compiler: do not check for main package in ConvertToManifest

This commit is contained in:
Evgenii Stratonikov 2020-12-10 17:45:23 +03:00
parent 9fd8577dd9
commit d7194e4da5

View file

@ -426,9 +426,6 @@ func parsePairJSON(data []byte, sep string) (string, string, error) {
// 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. // Note: manifest is taken from the external source, however it can be generated ad-hoc. See #1038.
func (di *DebugInfo) ConvertToManifest(o *Options) (*manifest.Manifest, error) { func (di *DebugInfo) ConvertToManifest(o *Options) (*manifest.Manifest, error) {
if di.MainPkg == "" {
return nil, errors.New("no Main method was found")
}
methods := make([]manifest.Method, 0) methods := make([]manifest.Method, 0)
for _, method := range di.Methods { for _, method := range di.Methods {
if method.IsExported && method.IsFunction && method.Name.Namespace == di.MainPkg { if method.IsExported && method.IsFunction && method.Name.Namespace == di.MainPkg {