From 9445c5c2fca88988c182e80f995721ab1288714c Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Mon, 8 Feb 2021 18:35:12 +0300 Subject: [PATCH] [#47] Replace `GetHeight` with `CurrentIndex` Signed-off-by: Alex Vanin --- common/vote.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/vote.go b/common/vote.go index 3ae57fa..7491006 100644 --- a/common/vote.go +++ b/common/vote.go @@ -2,8 +2,8 @@ package common import ( "github.com/nspcc-dev/neo-go/pkg/interop/binary" - "github.com/nspcc-dev/neo-go/pkg/interop/blockchain" "github.com/nspcc-dev/neo-go/pkg/interop/crypto" + "github.com/nspcc-dev/neo-go/pkg/interop/native/ledger" "github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/util" ) @@ -34,7 +34,7 @@ func Vote(ctx storage.Context, id, from []byte) int { newCandidates []Ballot candidates = getBallots(ctx) found = -1 - blockHeight = blockchain.GetHeight() + blockHeight = ledger.CurrentIndex() ) for i := 0; i < len(candidates); i++ {