Skip to content

Commit b5ce0c4

Browse files
authored
Merge pull request #606 from oasisprotocol/kostko/feature/rofl-deploy-export
feat(cmd/rofl): Allow transaction export for deploy
2 parents 34ec360 + a780b37 commit b5ce0c4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cmd/rofl/deploy.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ var (
211211

212212
var machineID roflmarket.InstanceID
213213
if !common.BroadcastOrExportTransaction(ctx, npa, conn, sigTx, meta, &machineID) {
214-
return nil, nil, fmt.Errorf("broadcast transaction failed")
214+
return nil, nil, nil
215215
}
216216

217217
rawMachineID, _ := machineID.MarshalText()
@@ -278,7 +278,7 @@ var (
278278
cobra.CheckErr(err)
279279

280280
if !common.BroadcastOrExportTransaction(ctx, npa, conn, sigTx, meta, nil) {
281-
return nil, fmt.Errorf("broadcast transaction failed")
281+
return nil, nil
282282
}
283283

284284
return insDsc, nil
@@ -295,6 +295,10 @@ var (
295295
cobra.CheckErr(err)
296296
}
297297

298+
if txCfg.Export {
299+
return
300+
}
301+
298302
fmt.Printf("Deployment into machine scheduled.\n")
299303
fmt.Printf("This machine expires on %s. Use `oasis rofl machine top-up` to extend it.\n", time.Unix(int64(insDsc.PaidUntil), 0))
300304
fmt.Printf("Use `oasis rofl machine show` to check status.\n")
@@ -479,6 +483,7 @@ func init() {
479483
providerFlags.BoolVar(&deployShowOffers, "show-offers", false, "show all provider offers and quit")
480484
providerFlags.BoolVar(&deployReplaceMachine, "replace-machine", false, "rent a new machine if the provided one expired")
481485

486+
deployCmd.Flags().AddFlagSet(common.AccountFlag)
482487
deployCmd.Flags().AddFlagSet(common.RuntimeTxFlags)
483488
deployCmd.Flags().AddFlagSet(providerFlags)
484489
deployCmd.Flags().AddFlagSet(roflCommon.DeploymentFlags)

0 commit comments

Comments
 (0)