From 18627e77ff9e19ee0f510f0609fdd7214cf7ac4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 21 Feb 2020 20:28:20 +0100 Subject: [PATCH] gofmt; mod tidy --- api/apistruct/struct.go | 2 +- chain/gen/genesis/miners.go | 12 ++++++------ chain/stmgr/utils.go | 2 +- cmd/lotus-storage-miner/init.go | 2 +- go.mod | 1 - go.sum | 15 --------------- storage/sealing/states.go | 4 ++-- 7 files changed, 11 insertions(+), 27 deletions(-) diff --git a/api/apistruct/struct.go b/api/apistruct/struct.go index d63a8a6a1..c24c9f8b6 100644 --- a/api/apistruct/struct.go +++ b/api/apistruct/struct.go @@ -132,7 +132,7 @@ type FullNodeStruct struct { PaychList func(context.Context) ([]address.Address, error) `perm:"read"` PaychStatus func(context.Context, address.Address) (*api.PaychStatus, error) `perm:"read"` PaychClose func(context.Context, address.Address) (cid.Cid, error) `perm:"sign"` - PaychAllocateLane func(context.Context, address.Address) (uint64, error) `perm:"sign"` + PaychAllocateLane func(context.Context, address.Address) (uint64, error) `perm:"sign"` PaychNewPayment func(ctx context.Context, from, to address.Address, vouchers []api.VoucherSpec) (*api.PaymentInfo, error) `perm:"sign"` PaychVoucherCheck func(context.Context, *types.SignedVoucher) error `perm:"read"` PaychVoucherCheckValid func(context.Context, address.Address, *types.SignedVoucher) error `perm:"read"` diff --git a/chain/gen/genesis/miners.go b/chain/gen/genesis/miners.go index 1b02cd336..2821d3e38 100644 --- a/chain/gen/genesis/miners.go +++ b/chain/gen/genesis/miners.go @@ -112,7 +112,7 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid params.Deals = append(params.Deals, market.ClientDealProposal{ Proposal: preseal.Deal, - ClientSignature: crypto.Signature{Type:crypto.SigTypeBLS}, // TODO: do we want to sign these? Or do we want to fake signatures for genesis setup? + ClientSignature: crypto.Signature{Type: crypto.SigTypeBLS}, // TODO: do we want to sign these? Or do we want to fake signatures for genesis setup? }) fmt.Printf("calling publish storage deals on miner %s with worker %s\n", preseal.Deal.Provider, m.Worker) } @@ -202,11 +202,11 @@ func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid { newSectorInfo := &miner.SectorOnChainInfo{ Info: miner.SectorPreCommitInfo{ - SectorNumber: preseal.SectorID, - SealedCID: commcid.ReplicaCommitmentV1ToCID(preseal.CommR[:]), - SealRandEpoch: 0, - DealIDs: []abi.DealID{dealIDs[pi]}, - Expiration: preseal.Deal.EndEpoch, + SectorNumber: preseal.SectorID, + SealedCID: commcid.ReplicaCommitmentV1ToCID(preseal.CommR[:]), + SealRandEpoch: 0, + DealIDs: []abi.DealID{dealIDs[pi]}, + Expiration: preseal.Deal.EndEpoch, }, ActivationEpoch: 0, DealWeight: dealWeight, diff --git a/chain/stmgr/utils.go b/chain/stmgr/utils.go index 7b950da18..39c80dc8c 100644 --- a/chain/stmgr/utils.go +++ b/chain/stmgr/utils.go @@ -287,7 +287,7 @@ func LoadSectorsFromSet(ctx context.Context, bs blockstore.Blockstore, ssc cid.C } sset = append(sset, &api.ChainSectorInfo{ Info: oci, - ID: abi.SectorNumber(i), + ID: abi.SectorNumber(i), }) return nil }); err != nil { diff --git a/cmd/lotus-storage-miner/init.go b/cmd/lotus-storage-miner/init.go index 22f5aff75..26e605add 100644 --- a/cmd/lotus-storage-miner/init.go +++ b/cmd/lotus-storage-miner/init.go @@ -522,7 +522,7 @@ func createStorageMiner(ctx context.Context, api lapi.FullNode, peerid peer.ID, params, err := actors.SerializeParams(&power.CreateMinerParams{ Worker: worker, SectorSize: abi.SectorSize(ssize), - Peer: peerid, + Peer: peerid, }) if err != nil { return address.Undef, err diff --git a/go.mod b/go.mod index 47691e912..34d857364 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/filecoin-project/chain-validation v0.0.3 github.com/filecoin-project/filecoin-ffi v0.0.0-20191219131535-bb699517a590 github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be - github.com/filecoin-project/go-amt-ipld v1.0.0 // indirect github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 github.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 diff --git a/go.sum b/go.sum index f04894764..6fc4f8c29 100644 --- a/go.sum +++ b/go.sum @@ -103,8 +103,6 @@ github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5 h1:/Mm github.com/filecoin-project/go-address v0.0.0-20200107215422-da8eea2842b5/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be h1:TooKBwR/g8jG0hZ3lqe9S5sy2vTUcLOZLlz3M5wGn2E= github.com/filecoin-project/go-address v0.0.2-0.20200218010043-eb9bb40ed5be/go.mod h1:SAOwJoakQ8EPjwNIsiakIQKsoKdkcbx8U3IapgCg9R0= -github.com/filecoin-project/go-amt-ipld v1.0.0 h1:jJteqdKcwFYoN9Wgs7MzDWVWvRWUfhhFo4bltJ7wrus= -github.com/filecoin-project/go-amt-ipld v1.0.0/go.mod h1:KsFPWjF+UUYl6n9A+qbg4bjFgAOneicFZtDH/LQEX2U= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e h1:IOoff6yAZSJ5zHCPY2jzGNwQYQU6ygsRVe/cSnJrY+o= github.com/filecoin-project/go-amt-ipld/v2 v2.0.1-0.20200131012142-05d80eeccc5e/go.mod h1:boRtQhzmxNocrMxOXo1NYn4oUc1NGvR8tEa79wApNXg= github.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8= @@ -115,8 +113,6 @@ github.com/filecoin-project/go-data-transfer v0.0.0-20191219005021-4accf56bd2ce github.com/filecoin-project/go-data-transfer v0.0.0-20191219005021-4accf56bd2ce/go.mod h1:b14UWxhxVCAjrQUYvVGrQRRsjAh79wXYejw9RbUcAww= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5 h1:yvQJCW9mmi9zy+51xA01Ea2X7/dL7r8eKDPuGUjRmbo= github.com/filecoin-project/go-fil-commcid v0.0.0-20200208005934-2b8bd03caca5/go.mod h1:JbkIgFF/Z9BDlvrJO1FuKkaWsH673/UdFaiVS6uIHlA= -github.com/filecoin-project/go-fil-markets v0.0.0-20200212222958-2202549b86ee h1:DAV4RFTUBM1120KSI++jySWKDWpZ0njO57byuKFksuc= -github.com/filecoin-project/go-fil-markets v0.0.0-20200212222958-2202549b86ee/go.mod h1:CUIM9THHU1A4tz5SIuVfqz+GPgWwUNVGa5ub7HaMC2o= github.com/filecoin-project/go-fil-markets v0.0.0-20200220181918-bfd030852a59 h1:AULXvl86fSjh1gS3V/xo2YEWntAOSe3HGAHO0+S2h8k= github.com/filecoin-project/go-fil-markets v0.0.0-20200220181918-bfd030852a59/go.mod h1:ftsiBbjLjNLAZ52FVDigkdCp73ltdcvAzAXav6drSLA= github.com/filecoin-project/go-padreader v0.0.0-20200210211231-548257017ca6 h1:92PET+sx1Hb4W/8CgFwGuxaKbttwY+UNspYZTvXY0vs= @@ -130,15 +126,7 @@ github.com/filecoin-project/go-statestore v0.1.0 h1:t56reH59843TwXHkMcwyuayStBIi github.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf h1:fbxBG12yrxilPFV1EG2lYqpUyAlRZWkvtqjk2svSeXY= github.com/filecoin-project/specs-actors v0.0.0-20200210130641-2d1fbd8672cf/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= -github.com/filecoin-project/specs-actors v0.0.0-20200218211922-372fea3f131f h1:xfjeZfwhrNlp9/71gprhfC+HL8htJukplomyGxrdkBY= -github.com/filecoin-project/specs-actors v0.0.0-20200218211922-372fea3f131f/go.mod h1:Ecx+3v6Bn4exCS0NbPu7VjrDCu2J+t1PdEpYin1/qOU= -github.com/filecoin-project/specs-actors v0.0.0-20200219191759-7e15e5c89659 h1:qHn5166bAy0dVEZr1Z4TPoveZNEEcFVz+RumCSM6QqA= -github.com/filecoin-project/specs-actors v0.0.0-20200219191759-7e15e5c89659/go.mod h1:Ecx+3v6Bn4exCS0NbPu7VjrDCu2J+t1PdEpYin1/qOU= github.com/filecoin-project/specs-actors v0.0.0-20200220011005-b2a2fbf40362/go.mod h1:xtDZUB6pe4Pksa/bAJbJ693OilaC5Wbot9jMhLm3cZA= -github.com/filecoin-project/specs-actors v0.0.0-20200221134721-ef38bdd3e05f h1:XplJWD0+rmozthAz4idL2wGyScmw9XlEZDaNmUKoY00= -github.com/filecoin-project/specs-actors v0.0.0-20200221134721-ef38bdd3e05f/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= -github.com/filecoin-project/specs-actors v0.0.0-20200221155838-19bb26c4b9d7 h1:iBqYva5s34J0LVBe7Fqrv/ToNVUFyKwpaXLk47wjq3A= -github.com/filecoin-project/specs-actors v0.0.0-20200221155838-19bb26c4b9d7/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= github.com/filecoin-project/specs-actors v0.0.0-20200221171119-030c8eaad3ba h1:KXxG0UblgNdQeAxdQZNXdECYV4FCJC/noXrIjvElO/0= github.com/filecoin-project/specs-actors v0.0.0-20200221171119-030c8eaad3ba/go.mod h1:0HAWYrvajFHDgRaKbF0rl+IybVLZL5z4gQ8koCMPhoU= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= @@ -237,8 +225,6 @@ github.com/ipfs/go-blockservice v0.1.3-0.20190908200855-f22eea50656c h1:lN5IQA07 github.com/ipfs/go-blockservice v0.1.3-0.20190908200855-f22eea50656c/go.mod h1:t+411r7psEUhLueM8C7aPA7cxCclv4O3VsUVxt9kz2I= github.com/ipfs/go-car v0.0.3-0.20200131220434-3f68f6ebd093 h1:mYq7vJKGUzxIkkYfqXfO0uEO8gOmV9F38Tcpvi/p8P8= github.com/ipfs/go-car v0.0.3-0.20200131220434-3f68f6ebd093/go.mod h1:rEkw0S1sHd5kHL3rUSGEhwNanYqTwwNhjtpp0rwjrr4= -github.com/ipfs/go-car v0.0.3-0.20200221190820-f8d2b317765c h1:+x2Z8X94BJ84WjtCCjMHmup72ZSgah1PiZafgWHjDSY= -github.com/ipfs/go-car v0.0.3-0.20200221190820-f8d2b317765c/go.mod h1://RJ9a4FVKRSNVmHgpvQax6Q6ii9Evtw/mqZSFt7yPE= github.com/ipfs/go-car v0.0.3-0.20200221191037-3762780fa84e h1:+wPt/tQHMOl00ekuf+5+ekWpyGQ6JOnF9vzEXjW7LtA= github.com/ipfs/go-car v0.0.3-0.20200221191037-3762780fa84e/go.mod h1:rEkw0S1sHd5kHL3rUSGEhwNanYqTwwNhjtpp0rwjrr4= github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= @@ -767,7 +753,6 @@ github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc h1:BCPnHtcboa github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM= github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba h1:X4n8JG2e2biEZZXdBKt9HX7DN3bYGFUqljqqy0DqgnY= github.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM= -github.com/whyrusleeping/cbor-gen v0.0.0-20190917003517-d78d67427694/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191116002219-891f55cd449d/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191212224538-d370462a7e8a/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= github.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY= diff --git a/storage/sealing/states.go b/storage/sealing/states.go index 0a8cfe1d0..4cd6549a8 100644 --- a/storage/sealing/states.go +++ b/storage/sealing/states.go @@ -102,9 +102,9 @@ func (m *Sealing) handlePreCommitting(ctx statemachine.Context, sector SectorInf Expiration: 0, SectorNumber: sector.SectorID, - SealedCID: commcid.ReplicaCommitmentV1ToCID(sector.CommR), + SealedCID: commcid.ReplicaCommitmentV1ToCID(sector.CommR), SealRandEpoch: sector.Ticket.BlockHeight, - DealIDs: nil, // sector.deals(), // TODO: REFACTOR + DealIDs: nil, // sector.deals(), // TODO: REFACTOR } enc, aerr := actors.SerializeParams(params) if aerr != nil {