Set correct Provider addr in StoreGarbage

This commit is contained in:
Łukasz Magiera 2019-11-02 15:13:21 +01:00
parent 3bc4a5dddf
commit be8fe54ea3
4 changed files with 6 additions and 4 deletions

View File

@ -2,6 +2,7 @@ package vm
import ( import (
"bytes" "bytes"
"encoding/hex"
"fmt" "fmt"
"reflect" "reflect"
@ -43,7 +44,8 @@ func (inv *invoker) Invoke(act *types.Actor, vmctx types.VMContext, method uint6
code, ok := inv.builtInCode[act.Code] code, ok := inv.builtInCode[act.Code]
if !ok { if !ok {
return nil, aerrors.Newf(255, "no code for actor %s", act.Code) log.Errorf("no code for actor %s", act.Code)
return nil, aerrors.Newf(255, "no code for actor %s(%d)(%s)", act.Code, method, hex.EncodeToString(params))
} }
if method >= uint64(len(code)) || code[method] == nil { if method >= uint64(len(code)) || code[method] == nil {
return nil, aerrors.Newf(255, "no method %d on actor", method) return nil, aerrors.Newf(255, "no method %d on actor", method)

View File

@ -20,7 +20,7 @@ type StorageMinerAPI struct {
SectorBlocks *sectorblocks.SectorBlocks SectorBlocks *sectorblocks.SectorBlocks
Miner *storage.Miner Miner *storage.Miner
Full api.FullNode Full api.FullNode
} }
func (sm *StorageMinerAPI) ActorAddress(context.Context) (address.Address, error) { func (sm *StorageMinerAPI) ActorAddress(context.Context) (address.Address, error) {

View File

@ -63,7 +63,7 @@ func (m *Miner) StoreGarbageData(_ context.Context) error {
PieceSize: size, PieceSize: size,
PieceSerialization: actors.SerializationUnixFSv0, PieceSerialization: actors.SerializationUnixFSv0,
Client: m.worker, Client: m.worker,
Provider: m.worker, Provider: m.maddr,
ProposalExpiration: math.MaxUint64, ProposalExpiration: math.MaxUint64,
Duration: math.MaxUint64 / 2, // /2 because overflows Duration: math.MaxUint64 / 2, // /2 because overflows
StoragePricePerEpoch: types.NewInt(0), StoragePricePerEpoch: types.NewInt(0),

View File

@ -143,7 +143,7 @@ func (m *Miner) committing(ctx context.Context, sector SectorInfo) (func(*Sector
params := &actors.SectorProveCommitInfo{ params := &actors.SectorProveCommitInfo{
Proof: proof, Proof: proof,
SectorID: sector.SectorID, SectorID: sector.SectorID,
DealIDs: deals, DealIDs: deals,
} }
enc, aerr := actors.SerializeParams(params) enc, aerr := actors.SerializeParams(params)