From 81622ed9846521c42613ccdf1beb634b96358c04 Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Tue, 21 Jun 2022 15:31:25 +0800 Subject: [PATCH] fix:allow storage miner actor --- minermgr/minermgr.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/minermgr/minermgr.go b/minermgr/minermgr.go index 9343793c..3fa21e2b 100644 --- a/minermgr/minermgr.go +++ b/minermgr/minermgr.go @@ -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, }) }