rpc: add codespace to ResultBroadcastTx (#4611)

Closes: #4606
This commit is contained in:
Yongwoo Lee
2020-03-31 16:49:28 +09:00
committed by GitHub
parent f5651d2b61
commit bcf27c2364
5 changed files with 28 additions and 9 deletions

View File

@@ -43,10 +43,11 @@ func BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcas
res := <-resCh
r := res.GetCheckTx()
return &ctypes.ResultBroadcastTx{
Code: r.Code,
Data: r.Data,
Log: r.Log,
Hash: tx.Hash(),
Code: r.Code,
Data: r.Data,
Log: r.Log,
Codespace: r.Codespace,
Hash: tx.Hash(),
}, nil
}

View File

@@ -148,9 +148,10 @@ type ResultConsensusState struct {
// CheckTx result
type ResultBroadcastTx struct {
Code uint32 `json:"code"`
Data bytes.HexBytes `json:"data"`
Log string `json:"log"`
Code uint32 `json:"code"`
Data bytes.HexBytes `json:"data"`
Log string `json:"log"`
Codespace string `json:"codespace"`
Hash bytes.HexBytes `json:"hash"`
}