forked from TrueCloudLab/frostfs-node
[#705] morph/notary: Add ProbeNotary
method to Client
`ProbeNotary` method checks if native `Notary` contract is presented on chain. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
46a66a21ec
commit
00b487e3c3
1 changed files with 6 additions and 0 deletions
|
@ -102,6 +102,12 @@ func (c *Client) NotaryEnabled() bool {
|
||||||
return c.notary != nil
|
return c.notary != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ProbeNotary checks if native `Notary` contract is presented on chain.
|
||||||
|
func (c *Client) ProbeNotary() bool {
|
||||||
|
_, err := c.client.GetNativeContractHash(nativenames.Notary)
|
||||||
|
return err == nil
|
||||||
|
}
|
||||||
|
|
||||||
// DepositNotary calls notary deposit method. Deposit is required to operate
|
// DepositNotary calls notary deposit method. Deposit is required to operate
|
||||||
// with notary contract. It used by notary contract in to produce fallback tx
|
// with notary contract. It used by notary contract in to produce fallback tx
|
||||||
// if main tx failed to create. Deposit isn't last forever, so it should
|
// if main tx failed to create. Deposit isn't last forever, so it should
|
||||||
|
|
Loading…
Reference in a new issue