From 7e43af3de3c3881738f3667620c3d5adaa1a04c2 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Wed, 21 Jul 2021 18:12:19 +0300 Subject: [PATCH] [#708] morph/client: Add BlockCount method Signed-off-by: Alex Vanin --- pkg/morph/client/client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/morph/client/client.go b/pkg/morph/client/client.go index 6c686b4c2..46c8d639b 100644 --- a/pkg/morph/client/client.go +++ b/pkg/morph/client/client.go @@ -315,3 +315,9 @@ func toStackParameter(value interface{}) (sc.Parameter, error) { func (c *Client) MagicNumber() uint64 { return uint64(c.client.GetNetwork()) } + +// BlockCount returns block count of the network +// to which the underlying RPC node client is connected. +func (c *Client) BlockCount() (uint32, error) { + return c.client.GetBlockCount() +}