Skip to content

Commit

Permalink
PR comment: codec => cdc
Browse files Browse the repository at this point in the history
  • Loading branch information
cwgoes committed May 15, 2018
1 parent ce38d8f commit a801874
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type BaseApp struct {
// initialized on creation
Logger log.Logger
name string // application name from abci.Info
codec *wire.Codec // Amino codec
cdc *wire.Codec // Amino codec
db dbm.DB // common DB backend
cms sdk.CommitMultiStore // Main (uncached) state
router Router // handle any kind of message
Expand Down Expand Up @@ -64,7 +64,7 @@ func NewBaseApp(name string, cdc *wire.Codec, logger log.Logger, db dbm.DB, txGa
app := &BaseApp{
Logger: logger,
name: name,
codec: cdc,
cdc: cdc,
db: db,
cms: store.NewCommitMultiStore(db),
router: NewRouter(),
Expand Down Expand Up @@ -302,7 +302,7 @@ func (app *BaseApp) Query(req abci.RequestQuery) (res abci.ResponseQuery) {
default:
result = sdk.ErrUnknownRequest(fmt.Sprintf("Unknown query: %s", path)).Result()
}
value := app.codec.MustMarshalBinary(result)
value := app.cdc.MustMarshalBinary(result)
return abci.ResponseQuery{
Code: uint32(sdk.ABCICodeOK),
Value: value,
Expand Down
2 changes: 1 addition & 1 deletion baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func TestSimulateTx(t *testing.T) {
queryResult := app.Query(query)
require.Equal(t, queryResult.Code, uint32(sdk.ABCICodeOK))
var res sdk.Result
app.codec.MustUnmarshalBinary(queryResult.Value, &res)
app.cdc.MustUnmarshalBinary(queryResult.Value, &res)
require.Equal(t, res.Code, sdk.ABCICodeOK)
require.Equal(t, res.GasUsed, int64(80))
app.EndBlock(abci.RequestEndBlock{})
Expand Down

0 comments on commit a801874

Please sign in to comment.