From dc58f71604b6dbf63c21da966a2d4e146b36abeb Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 17 Sep 2020 14:59:10 -0700 Subject: [PATCH] remove unnecessary code Go does have some nice features, once in a while. --- chain/actors/builtin/market/v0.go | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/chain/actors/builtin/market/v0.go b/chain/actors/builtin/market/v0.go index 92ebb59ba..d2e77fa92 100644 --- a/chain/actors/builtin/market/v0.go +++ b/chain/actors/builtin/market/v0.go @@ -184,11 +184,7 @@ func (d *v0MarketStatesDiffer) Remove(key uint64, val *typegen.Deferred) error { } func fromV0DealState(v0 market.DealState) DealState { - return DealState{ - SectorStartEpoch: v0.SectorStartEpoch, - SlashEpoch: v0.SlashEpoch, - LastUpdatedEpoch: v0.LastUpdatedEpoch, - } + return (DealState)(v0) } type v0DealProposals struct { @@ -234,19 +230,7 @@ type v0MarketProposalsDiffer struct { } func fromV0DealProposal(v0 market.DealProposal) DealProposal { - return DealProposal{ - PieceCID: v0.PieceCID, - PieceSize: v0.PieceSize, - VerifiedDeal: v0.VerifiedDeal, - Client: v0.Client, - Provider: v0.Provider, - Label: v0.Label, - StartEpoch: v0.StartEpoch, - EndEpoch: v0.EndEpoch, - StoragePricePerEpoch: v0.StoragePricePerEpoch, - ProviderCollateral: v0.ProviderCollateral, - ClientCollateral: v0.ClientCollateral, - } + return (DealProposal)(v0) } func (d *v0MarketProposalsDiffer) Add(key uint64, val *typegen.Deferred) error {