Fix lint warnings
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
parent
c4022505c7
commit
44fdf98484
@ -89,7 +89,7 @@ func (ia InitActor) Exec(act *types.Actor, vmctx types.VMContext, p *ExecParams)
|
||||
}
|
||||
|
||||
// The call to the actors constructor will set up the initial state
|
||||
// from the given parameters, setting `actor.Head` to a new value when successfull.
|
||||
// from the given parameters, setting `actor.Head` to a new value when successful.
|
||||
// TODO: can constructors fail?
|
||||
//actor.Constructor(p.Params)
|
||||
|
||||
|
10
chain/vm.go
10
chain/vm.go
@ -258,9 +258,15 @@ func (vm *VM) Invoke(act *types.Actor, vmctx *VMContext, method uint64, params [
|
||||
|
||||
func ComputeActorAddress(creator address.Address, nonce uint64) (address.Address, error) {
|
||||
buf := new(bytes.Buffer)
|
||||
buf.Write(creator.Bytes())
|
||||
_, err := buf.Write(creator.Bytes())
|
||||
if err != nil {
|
||||
return address.Address{}, err
|
||||
}
|
||||
|
||||
binary.Write(buf, binary.BigEndian, nonce)
|
||||
err = binary.Write(buf, binary.BigEndian, nonce)
|
||||
if err != nil {
|
||||
return address.Address{}, err
|
||||
}
|
||||
|
||||
return address.NewActorAddress(buf.Bytes())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user