Merge pull request #454 from waynewyang/InitActorState-AddActor

fix method:InitActorState.AddActor
This commit is contained in:
Łukasz Magiera 2019-10-25 17:40:12 +02:00 committed by GitHub
commit b8b081faa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
}