forked from TrueCloudLab/neoneo-go
compiler: convert to manifest only methods from main pkg
manifest.json should contain only methods from the package where `Main` function located.
This commit is contained in:
parent
c2dccb6314
commit
f37831d173
1 changed files with 5 additions and 3 deletions
|
@ -342,6 +342,7 @@ func parsePairJSON(data []byte, sep string) (string, string, error) {
|
|||
func (di *DebugInfo) convertToManifest(fs smartcontract.PropertyState) (*manifest.Manifest, error) {
|
||||
var (
|
||||
entryPoint manifest.Method
|
||||
mainNamespace string
|
||||
err error
|
||||
)
|
||||
for _, method := range di.Methods {
|
||||
|
@ -350,6 +351,7 @@ func (di *DebugInfo) convertToManifest(fs smartcontract.PropertyState) (*manifes
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
mainNamespace = method.Name.Namespace
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -358,7 +360,7 @@ func (di *DebugInfo) convertToManifest(fs smartcontract.PropertyState) (*manifes
|
|||
}
|
||||
methods := make([]manifest.Method, 0)
|
||||
for _, method := range di.Methods {
|
||||
if method.Name.Name != mainIdent && method.IsExported {
|
||||
if method.Name.Name != mainIdent && method.IsExported && method.Name.Namespace == mainNamespace {
|
||||
mMethod, err := method.ToManifestMethod()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue