Merge PR #2215: Add swagger-ui for gaiacli lite-server

This commit is contained in:
HaoyangLiu
2018-10-04 13:00:24 +02:00
committed by Christopher Goes
parent b4e8fe5e94
commit 9f67e8af20
46 changed files with 81580 additions and 1050 deletions
+16
View File
@@ -69,6 +69,22 @@ func (ctx CLIContext) BroadcastTxAndAwaitCommit(tx []byte) (*ctypes.ResultBroadc
return res, err
}
// BroadcastTxSync broadcasts transaction bytes to a Tendermint node
// synchronously.
func (ctx CLIContext) BroadcastTxSync(tx []byte) (*ctypes.ResultBroadcastTx, error) {
node, err := ctx.GetNode()
if err != nil {
return nil, err
}
res, err := node.BroadcastTxSync(tx)
if err != nil {
return res, err
}
return res, err
}
// BroadcastTxAsync broadcasts transaction bytes to a Tendermint node
// asynchronously.
func (ctx CLIContext) BroadcastTxAsync(tx []byte) (*ctypes.ResultBroadcastTx, error) {
+2
View File
@@ -50,6 +50,7 @@ type CLIContext struct {
GenerateOnly bool
fromAddress types.AccAddress
fromName string
Indent bool
}
// NewCLIContext returns a new initialized CLIContext with parameters from the
@@ -87,6 +88,7 @@ func NewCLIContext() CLIContext {
GenerateOnly: viper.GetBool(client.FlagGenerateOnly),
fromAddress: fromAddress,
fromName: fromName,
Indent: viper.GetBool(client.FlagIndentResponse),
}
}