-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(store): add rawlog in txstatus #1458
feat(store): add rawlog in txstatus #1458
Conversation
da0ee83
to
de7185e
Compare
proto/tendermint/store/types.proto
Outdated
// The unprocessed log output generated during | ||
// the execution of a transaction. | ||
string raw_log = 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] is there a non-raw / processed form of the log? Other names in this PR call it logs
, response.Log
so if there is actually no difference between raw log and log, proposal to rename it to log for consistency:
// The unprocessed log output generated during | |
// the execution of a transaction. | |
string raw_log = 4; | |
// The unprocessed log output generated during | |
// the execution of a transaction. | |
string log = 4; |
store/store.go
Outdated
@@ -466,6 +470,10 @@ func (bs *BlockStore) SaveTxInfo(block *types.Block, txResponseCodes []uint32) e | |||
Index: uint32(i), | |||
Code: txResponseCodes[i], | |||
} | |||
// Only add rawLog for failed transactions | |||
if txResponseCodes[i] != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would put abci.CodeTypeOk
instead of relying on numbers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Co-authored-by: Rootul P <[email protected]>
88e363c
@@ -414,6 +417,12 @@ func TestSaveTxInfo(t *testing.T) { | |||
require.Equal(t, block.Height, txInfo.Height) | |||
require.Equal(t, uint32(i), txInfo.Index) | |||
require.Equal(t, txResponseCodes[i], txInfo.Code) | |||
// We don't save the logs for successful transactions | |||
if txResponseCodes[i] == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[optional]
if txResponseCodes[i] == 0 { | |
if txResponseCodes[i] == abci.CodeTypeOK { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved in a previous commit! thanks rootul!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this instance was resolved in a previous commit though
9563209
into
celestiaorg:v0.34.x-celestia
Description
Fixes #1454