mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
TxResult includes Tx. /tx only works if indexer active
This commit is contained in:
@@ -84,7 +84,12 @@ func execBlockOnProxyApp(eventCache types.Fireable, proxyAppConn proxy.AppConnCo
|
||||
txError = txResult.Code.String()
|
||||
}
|
||||
|
||||
txResults[txIndex] = &types.TxResult{uint64(block.Height), uint32(txIndex), *txResult}
|
||||
txResults[txIndex] = &types.TxResult{
|
||||
Height: uint64(block.Height),
|
||||
Index: uint32(txIndex),
|
||||
Tx: req.GetDeliverTx().Tx,
|
||||
Result: *txResult,
|
||||
}
|
||||
txIndex++
|
||||
|
||||
// NOTE: if we count we can access the tx from the block instead of
|
||||
|
||||
@@ -18,7 +18,7 @@ func TestTxIndex(t *testing.T) {
|
||||
indexer := &TxIndex{store: db.NewMemDB()}
|
||||
|
||||
tx := types.Tx("HELLO WORLD")
|
||||
txResult := &types.TxResult{1, 1, abci.ResponseDeliverTx{Data: []byte{0}, Code: abci.CodeType_OK, Log: ""}}
|
||||
txResult := &types.TxResult{1, 1, tx, abci.ResponseDeliverTx{Data: []byte{0}, Code: abci.CodeType_OK, Log: ""}}
|
||||
hash := tx.Hash()
|
||||
|
||||
batch := txindex.NewBatch()
|
||||
@@ -32,7 +32,8 @@ func TestTxIndex(t *testing.T) {
|
||||
}
|
||||
|
||||
func benchmarkTxIndex(txsCount int, b *testing.B) {
|
||||
txResult := &types.TxResult{1, 1, abci.ResponseDeliverTx{Data: []byte{0}, Code: abci.CodeType_OK, Log: ""}}
|
||||
tx := types.Tx("HELLO WORLD")
|
||||
txResult := &types.TxResult{1, 1, tx, abci.ResponseDeliverTx{Data: []byte{0}, Code: abci.CodeType_OK, Log: ""}}
|
||||
|
||||
dir, err := ioutil.TempDir("", "tx_indexer_db")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user