[#979] morph/client: Return zero values from CalculateNonceAndVUB

Make `CalculateNonceAndVUB` to return zero values if notary isn't
enabled.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-11-30 20:31:26 +03:00 committed by LeL
parent 4b8ca75274
commit ca2c6ad77f

View file

@ -875,6 +875,10 @@ func (c *Client) CalculateNonceAndVUB(hash util.Uint256) (nonce uint32, vub uint
})
}
if c.notary == nil {
return 0, 0, nil
}
// TODO: cache values since some operations uses same TX as triggers
nonce = binary.LittleEndian.Uint32(hash.BytesLE())