Skip to content
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

Map Ostracon:ErrTxInMap to lbm-sdk:ErrTxInMempoolCache #890

Merged
merged 3 commits into from
Feb 10, 2023

Conversation

Mdaiki0730
Copy link
Member

@Mdaiki0730 Mdaiki0730 commented Feb 9, 2023

Description

lbm-sdk needs to be mapped for new errors in ostracon(ErrTxInMap).
For this error, lbm-sdk maps errors in types/errors/errors.go to make it easier for users to handle.

An implementation concern is whether ErrInTxMempoolCache fully explains this error.

  • For cosmos-sdk compatibility and lbm-sdk interface retention
  • "ErrInTxMempoolCache" is insufficient, but the message "tx already in mempool" is enough to explain

For this reason, I mapped it to ErrTxInMempoolCache, but I think renaming this error to ErrTxInMempool is also a way.

closes: #810

Motivation and context

How has this been tested?

Screenshots (if appropriate):

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@Mdaiki0730 Mdaiki0730 self-assigned this Feb 9, 2023
@CLAassistant
Copy link

CLAassistant commented Feb 9, 2023

CLA assistant check
All committers have signed the CLA.

@Mdaiki0730 Mdaiki0730 added the A: improvement Changes in existing functionality label Feb 9, 2023
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Merging #890 (1a653b1) into main (e2aa3ea) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #890   +/-   ##
=======================================
  Coverage   62.31%   62.31%           
=======================================
  Files         652      652           
  Lines       79493    79493           
=======================================
+ Hits        49534    49535    +1     
+ Misses      27279    27278    -1     
  Partials     2680     2680           
Impacted Files Coverage Δ
client/broadcast.go 53.19% <100.00%> (ø)
baseapp/abci.go 58.11% <0.00%> (ø)
types/abci.pb.go 0.51% <0.00%> (ø)
baseapp/baseapp.go 78.66% <0.00%> (ø)
testutil/context.go 0.00% <0.00%> (ø)
simapp/test_helpers.go 9.86% <0.00%> (ø)
x/simulation/mock_ostracon.go 0.00% <0.00%> (ø)
x/upgrade/client/testutil/suite.go 100.00% <0.00%> (ø)
crypto/keys/internal/ecdsa/privkey.go 83.01% <0.00%> (+1.88%) ⬆️

@Mdaiki0730 Mdaiki0730 requested review from loin3, tnasu and ulbqb February 9, 2023 10:52
@Mdaiki0730 Mdaiki0730 marked this pull request as ready for review February 9, 2023 11:07
client/broadcast.go Outdated Show resolved Hide resolved
@Mdaiki0730 Mdaiki0730 requested a review from tkxkd0159 February 10, 2023 04:12
@zemyblue zemyblue self-requested a review February 10, 2023 05:50
@Mdaiki0730 Mdaiki0730 merged commit d70e63b into Finschia:main Feb 10, 2023
@Mdaiki0730 Mdaiki0730 deleted the map-errtxinmap branch February 10, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: improvement Changes in existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Map for ErrTxInMap in ostracon
5 participants