[#47] Replace GetHeight with CurrentIndex

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-02-08 18:35:12 +03:00 committed by Alex Vanin
parent 27ca675869
commit 9445c5c2fc

View file

@ -2,8 +2,8 @@ package common
import ( import (
"github.com/nspcc-dev/neo-go/pkg/interop/binary" "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/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/storage"
"github.com/nspcc-dev/neo-go/pkg/interop/util" "github.com/nspcc-dev/neo-go/pkg/interop/util"
) )
@ -34,7 +34,7 @@ func Vote(ctx storage.Context, id, from []byte) int {
newCandidates []Ballot newCandidates []Ballot
candidates = getBallots(ctx) candidates = getBallots(ctx)
found = -1 found = -1
blockHeight = blockchain.GetHeight() blockHeight = ledger.CurrentIndex()
) )
for i := 0; i < len(candidates); i++ { for i := 0; i < len(candidates); i++ {