Fix misspell

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
Jakub Sztandera 2019-08-16 14:41:43 +02:00
parent 27057ee222
commit f6387da969

View File

@ -37,7 +37,7 @@ type VMContext struct {
height uint64 height uint64
cst *hamt.CborIpldStore cst *hamt.CborIpldStore
gasAvaliable types.BigInt gasAvailable types.BigInt
gasUsed types.BigInt gasUsed types.BigInt
// root cid of the state of the actor this invocation will be on // root cid of the state of the actor this invocation will be on
@ -117,7 +117,7 @@ func (vmc *VMContext) Send(to address.Address, method uint64, value types.BigInt
Method: method, Method: method,
Value: value, Value: value,
Params: params, Params: params,
GasLimit: vmc.gasAvaliable, GasLimit: vmc.gasAvailable,
} }
ret, err, _ := vmc.vm.send(ctx, msg, vmc) ret, err, _ := vmc.vm.send(ctx, msg, vmc)
@ -136,8 +136,8 @@ func (vmc *VMContext) GasUsed() types.BigInt {
func (vmc *VMContext) ChargeGas(amount uint64) aerrors.ActorError { func (vmc *VMContext) ChargeGas(amount uint64) aerrors.ActorError {
toUse := types.NewInt(amount) toUse := types.NewInt(amount)
vmc.gasUsed = types.BigAdd(vmc.gasUsed, toUse) vmc.gasUsed = types.BigAdd(vmc.gasUsed, toUse)
if types.BigCmp(vmc.gasUsed, vmc.gasAvaliable) > 0 { if types.BigCmp(vmc.gasUsed, vmc.gasAvailable) > 0 {
return aerrors.Newf(254, "not enough gas: used=%s, avaliable=%s", vmc.gasUsed, vmc.gasAvaliable) return aerrors.Newf(254, "not enough gas: used=%s, available=%s", vmc.gasUsed, vmc.gasAvailable)
} }
return nil return nil
} }
@ -205,7 +205,7 @@ func (vm *VM) makeVMContext(ctx context.Context, sroot cid.Cid, msg *types.Messa
}, },
gasUsed: usedGas, gasUsed: usedGas,
gasAvaliable: msg.GasLimit, gasAvailable: msg.GasLimit,
} }
} }