Skip to content

Commit

Permalink
converts uint64 to bigint
Browse files Browse the repository at this point in the history
  • Loading branch information
staheri14 committed Oct 19, 2023
1 parent 8234475 commit efae962
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/blobstream/types/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package types
import (
"bytes"
"math"
"math/big"
"sort"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -118,7 +119,7 @@ func (ibv InternalBridgeValidators) PowerDiff(c InternalBridgeValidators) sdk.De
powers := map[string]sdk.Dec{}
// loop over ibv and initialize the map with their powers
for _, bv := range ibv {
powers[bv.EVMAddress.Hex()] = sdk.NewDec(int64(bv.Power))
powers[bv.EVMAddress.Hex()] = sdk.NewDecFromBigInt(new(big.Int).SetUint64(bv.Power))
}

// subtract c powers from powers in the map, initializing
Expand Down

0 comments on commit efae962

Please sign in to comment.