File tree Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Expand file tree Collapse file tree 4 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ var mutationType = graphql.NewObject(
166166 },
167167)
168168
169+ //Start start the API
169170func Start () error {
170171 http .HandleFunc ("/bftx-api" , httpHandler (& schema ))
171172 fmt .Println ("Now server is running on: http://localhost:12345" )
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import (
2626 abciTypes "github.com/tendermint/abci/types"
2727)
2828
29+ //TendermintClient object to call function from tendermint
2930var TendermintClient abcicli.Client
3031
3132// ConstructBfTx function to create a BFTX via API
Original file line number Diff line number Diff line change @@ -53,10 +53,12 @@ import (
5353 "github.com/blockfreight/go-bftx/lib/pkg/common" // Implements common functions for Blockfreight™
5454)
5555
56+ //Config objetc to isolate all the app config in a single object
5657type Config struct {
5758 BFTX_API_ADDRESS string `json:"bftx-api-address"`
5859}
5960
61+ //LoadConfiguration loads the app config into an object
6062func LoadConfiguration () (Config , error ) {
6163 var config Config
6264 configFile , err := common .ReadJSON ("./config.json" )
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ func (app *BftApplication) Commit() types.ResponseCommit {
143143 return types.ResponseCommit {Code : code .CodeTypeOK , Data : hash }
144144}
145145
146+ //Query retrieves a transaction from the network
146147func (app * BftApplication ) Query (reqQuery types.RequestQuery ) (resQuery types.ResponseQuery ) {
147148 if reqQuery .Prove {
148149 value , proof , err := app .state .GetWithProof (reqQuery .Data )
You can’t perform that action at this time.
0 commit comments