lotus/gen/main.go

84 lines
2.0 KiB
Go
Raw Normal View History

2019-08-21 17:15:28 +00:00
package main
import (
"fmt"
"os"
"github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/types"
2019-08-21 17:15:28 +00:00
gen "github.com/whyrusleeping/cbor-gen"
)
func main() {
2019-09-10 02:05:24 +00:00
err := gen.WriteTupleEncodersToFile("./chain/types/cbor_gen.go", "types",
types.BlockHeader{},
types.Ticket{},
types.Message{},
types.SignedMessage{},
types.MsgMeta{},
types.SignedVoucher{},
types.ModVerifyParams{},
types.Merge{},
2019-09-17 01:56:37 +00:00
types.Actor{},
types.MessageReceipt{},
types.BlockMsg{},
2019-09-10 02:05:24 +00:00
)
if err != nil {
fmt.Println(err)
os.Exit(1)
2019-08-21 17:15:28 +00:00
}
2019-09-10 02:05:24 +00:00
/*
err = gen.WriteTupleEncodersToFile("./chain/cbor_gen.go", "chain",
2019-08-22 01:29:19 +00:00
chain.BlockSyncRequest{},
chain.BlockSyncResponse{},
chain.BSTipSet{},
2019-09-10 02:05:24 +00:00
)
2019-09-09 17:22:40 +00:00
if err != nil {
2019-09-10 02:05:24 +00:00
fmt.Println(err)
2019-09-09 17:22:40 +00:00
os.Exit(1)
}
2019-09-10 02:05:24 +00:00
*/
2019-09-09 17:22:40 +00:00
2019-09-10 02:05:24 +00:00
err = gen.WriteTupleEncodersToFile("./chain/actors/cbor_gen.go", "actors",
actors.InitActorState{},
actors.ExecParams{},
actors.AccountActorState{},
actors.StorageMinerActorState{},
actors.StorageMinerConstructorParams{},
actors.CommitSectorParams{},
actors.MinerInfo{},
actors.SubmitPoStParams{},
actors.PieceInclVoucherData{},
actors.InclusionProof{},
actors.PaymentVerifyParams{},
actors.UpdatePeerIDParams{},
actors.MultiSigActorState{},
actors.MultiSigConstructorParams{},
actors.MultiSigProposeParams{},
actors.MultiSigTxID{},
actors.MultiSigSwapSignerParams{},
actors.MultiSigChangeReqParams{},
actors.MTransaction{},
actors.MultiSigRemoveSignerParam{},
actors.MultiSigAddSignerParam{},
actors.PaymentChannelActorState{},
actors.PCAConstructorParams{},
actors.LaneState{},
actors.PCAUpdateChannelStateParams{},
actors.PaymentInfo{},
actors.StoragePowerState{},
2019-09-10 02:05:24 +00:00
actors.CreateStorageMinerParams{},
actors.IsMinerParam{},
actors.PowerLookupParams{},
actors.UpdateStorageParams{},
actors.ArbitrateConsensusFaultParams{},
2019-09-12 04:12:35 +00:00
actors.PledgeCollateralParams{},
actors.MinerSlashConsensusFault{},
2019-09-10 02:05:24 +00:00
)
if err != nil {
fmt.Println(err)
os.Exit(1)
2019-09-09 17:22:40 +00:00
}
2019-08-21 17:15:28 +00:00
}