[#324] Close nns resolver after use

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
Marina Biryukova 2024-03-01 17:29:56 +03:00 committed by Alexey Vanin
parent 8050ca2d51
commit 70043c4800

View file

@ -28,6 +28,7 @@ func ResolveContractHash(contractHash, rpcAddress string) (util.Uint160, error)
if err := nns.Dial(rpcAddress); err != nil {
return util.Uint160{}, fmt.Errorf("dial nns %s: %w", rpcAddress, err)
}
defer nns.Close()
return nns.ResolveContractHash(domain)
}