[#398] morph/client: Add method to read magic number
Implement `Client.MagicNumber` method that returns magic number of the network to which the underlying RPC node client is connected. Network magic value is received via `GetNetwork` method. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
146abe8520
commit
4c8d29ce46
1 changed files with 6 additions and 0 deletions
|
@ -166,3 +166,9 @@ func toStackParameter(value interface{}) (sc.Parameter, error) {
|
|||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// MagicNumber returns the magic number of the network
|
||||
// to which the underlying RPC node client is connected.
|
||||
func (c *Client) MagicNumber() uint64 {
|
||||
return uint64(c.client.GetNetwork())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue