More tweaking of PreSeal for genesis
This commit is contained in:
parent
5f0ad230aa
commit
97b04b7f77
@ -241,6 +241,8 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sys vm.Syscal
|
|||||||
return cid.Undef, fmt.Errorf("failed to marshal proposal: %w", err)
|
return cid.Undef, fmt.Errorf("failed to marshal proposal: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Println("key type ", preseal.DealClientKey.Type)
|
||||||
|
fmt.Printf("key bytes %x\n", preseal.DealClientKey.PrivateKey)
|
||||||
sig, err := sigs.Sign(key.ActSigType(preseal.DealClientKey.Type), preseal.DealClientKey.PrivateKey, buf)
|
sig, err := sigs.Sign(key.ActSigType(preseal.DealClientKey.Type), preseal.DealClientKey.PrivateKey, buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return cid.Undef, fmt.Errorf("failed to sign proposal: %w", err)
|
return cid.Undef, fmt.Errorf("failed to sign proposal: %w", err)
|
||||||
|
@ -268,7 +268,7 @@ func createDeals(m *genesis.Miner, k *key.Key, maddr address.Address, ssize abi.
|
|||||||
ClientCollateral: big.Zero(),
|
ClientCollateral: big.Zero(),
|
||||||
}
|
}
|
||||||
|
|
||||||
sector.DealClientKey = &k.KeyInfo
|
sector.DealClientKey = k.KeyInfo
|
||||||
sector.Deal = *proposal
|
sector.Deal = *proposal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ type PreSeal struct {
|
|||||||
CommD cid.Cid
|
CommD cid.Cid
|
||||||
SectorID abi.SectorNumber
|
SectorID abi.SectorNumber
|
||||||
Deal market8.DealProposal
|
Deal market8.DealProposal
|
||||||
DealClientKey *types.KeyInfo
|
DealClientKey types.KeyInfo
|
||||||
ProofType abi.RegisteredSealProof
|
ProofType abi.RegisteredSealProof
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ func PreSeal(spt abi.RegisteredSealProof, maddr address.Address, sectors int) (*
|
|||||||
ProviderCollateral: big.Zero(),
|
ProviderCollateral: big.Zero(),
|
||||||
ClientCollateral: big.Zero(),
|
ClientCollateral: big.Zero(),
|
||||||
}
|
}
|
||||||
preseal.DealClientKey = &k.KeyInfo
|
preseal.DealClientKey = k.KeyInfo
|
||||||
|
|
||||||
genm.Sectors[i] = preseal
|
genm.Sectors[i] = preseal
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user