Set correct Provider addr in StoreGarbage
This commit is contained in:
parent
3bc4a5dddf
commit
be8fe54ea3
@ -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)
|
||||||
|
@ -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) {
|
||||||
|
@ -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),
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user