More tweaking of PreSeal for genesis

This commit is contained in:
Aayush
2022-10-06 11:06:21 -04:00
committed by Geoff Stuart
parent 5f0ad230aa
commit 97b04b7f77
4 changed files with 5 additions and 3 deletions
+2
View File
@@ -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)
}
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)
if err != nil {
return cid.Undef, fmt.Errorf("failed to sign proposal: %w", err)
+1 -1
View File
@@ -268,7 +268,7 @@ func createDeals(m *genesis.Miner, k *key.Key, maddr address.Address, ssize abi.
ClientCollateral: big.Zero(),
}
sector.DealClientKey = &k.KeyInfo
sector.DealClientKey = k.KeyInfo
sector.Deal = *proposal
}
+1 -1
View File
@@ -26,7 +26,7 @@ type PreSeal struct {
CommD cid.Cid
SectorID abi.SectorNumber
Deal market8.DealProposal
DealClientKey *types.KeyInfo
DealClientKey types.KeyInfo
ProofType abi.RegisteredSealProof
}
+1 -1
View File
@@ -72,7 +72,7 @@ func PreSeal(spt abi.RegisteredSealProof, maddr address.Address, sectors int) (*
ProviderCollateral: big.Zero(),
ClientCollateral: big.Zero(),
}
preseal.DealClientKey = &k.KeyInfo
preseal.DealClientKey = k.KeyInfo
genm.Sectors[i] = preseal
}