rename 'Fil' to 'FromFil'

This commit is contained in:
whyrusleeping 2019-09-16 09:47:42 -07:00
parent 3154374132
commit 49c677fb6e
2 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ func MakeInitialStateTree(bs bstore.Blockstore, actmap map[address.Address]types
return nil, xerrors.Errorf("set storage market actor: %w", err) return nil, xerrors.Errorf("set storage market actor: %w", err)
} }
netAmt := types.Fil(types.NewInt(build.TotalFilecoin)) netAmt := types.FromFil(build.TotalFilecoin)
for _, amt := range actmap { for _, amt := range actmap {
netAmt = types.BigSub(netAmt, amt) netAmt = types.BigSub(netAmt, amt)
} }

View File

@ -43,8 +43,8 @@ func NewInt(i uint64) BigInt {
return BigInt{big.NewInt(0).SetUint64(i)} return BigInt{big.NewInt(0).SetUint64(i)}
} }
func Fil(i BigInt) BigInt { func FromFil(i uint64) BigInt {
return BigMul(i, NewInt(build.FilecoinPrecision)) return BigMul(NewInt(i), NewInt(build.FilecoinPrecision))
} }
func BigFromBytes(b []byte) BigInt { func BigFromBytes(b []byte) BigInt {