Skip to content

Commit

Permalink
fix:allow storage miner actor
Browse files Browse the repository at this point in the history
  • Loading branch information
hunjixin committed Jun 21, 2022
1 parent 3c8e8d8 commit 81622ed
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions minermgr/minermgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,22 @@ func (m *UserMgrImpl) appendAddress(ctx context.Context, account string, addr ad
}

if builtin.IsAccountActor(actor.Code) {
ownerKey, err := m.fullNode.StateAccountKey(ctx, addr, vTypes.EmptyTSK)
accountKey, err := m.fullNode.StateAccountKey(ctx, addr, vTypes.EmptyTSK)
if err != nil {
return err
}
if _, ok := filter[ownerKey]; !ok {
filter[ownerKey] = struct{}{}
if _, ok := filter[accountKey]; !ok {
filter[accountKey] = struct{}{}
m.miners = append(m.miners, types.User{
Addr: ownerKey,
Addr: accountKey,
Account: account,
})
}
} else if builtin.IsStorageMinerActor(actor.Code) {
if _, ok := filter[addr]; !ok {
filter[addr] = struct{}{}
m.miners = append(m.miners, types.User{
Addr: addr,
Account: account,
})
}
Expand Down

0 comments on commit 81622ed

Please sign in to comment.