fix method:InitActorState.AddActor

This commit is contained in:
waynewyang 2019-10-23 10:47:45 +08:00
parent 007edf7830
commit d265f4a04f

View File

@ -175,7 +175,6 @@ func IsSingletonActor(code cid.Cid) bool {
func (ias *InitActorState) AddActor(cst *hamt.CborIpldStore, addr address.Address) (address.Address, error) {
nid := ias.NextID
ias.NextID++
amap, err := hamt.LoadNode(context.TODO(), cst, ias.AddressMap)
if err != nil {
@ -195,6 +194,7 @@ func (ias *InitActorState) AddActor(cst *hamt.CborIpldStore, addr address.Addres
return address.Undef, err
}
ias.AddressMap = ncid
ias.NextID++
return NewIDAddress(nid)
}