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

fix nil pointer, see 1198 #1200

Merged
merged 2 commits into from
Nov 23, 2023
Merged

fix nil pointer, see 1198 #1200

merged 2 commits into from
Nov 23, 2023

Conversation

jordipainan
Copy link
Member

closes #1198

Copy link
Member

@p4u p4u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check this same issue does not happend on other handlers.

api/accounts.go Outdated Show resolved Hide resolved
api/accounts.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Nov 23, 2023

Pull Request Test Coverage Report for Build 6972357204

  • 14 of 35 (40.0%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 61.764%

Changes Missing Coverage Covered Lines Changed/Added Lines %
vochain/transaction/vochaintx/vochaintx.go 5 9 55.56%
api/accounts.go 5 11 45.45%
vochain/cometbft.go 4 15 26.67%
Files with Coverage Reduction New Missed Lines %
data/ipfs/ipfs.go 2 54.64%
Totals Coverage Status
Change from base Build 6944527117: 0.1%
Covered Lines: 14661
Relevant Lines: 23737

💛 - Coveralls

@p4u
Copy link
Member

p4u commented Nov 23, 2023

Btw, the issue seems to be at

go.vocdoni.io/dvote/vochain/transaction/vochaintx.(*Tx).Unmarshal(0xc01c6335e0, {0x0, 0x0, 0x0}, {0xc002930060, 0xe})
	go.vocdoni.io/dvote/vochain/transaction/vochaintx/vochaintx.go:39 +0x20d
go.vocdoni.io/dvote/vochain.(*BaseApplication).CheckTx(0xc0044d6420, {0x40?, 0x36c0a00?}, 0xc01c62c4a0)
	go.vocdoni.io/dvote/vochain/cometbft.go:196 +0x44a

So the check must exist in the API layer but also on the vochain transaction handler.

@jordipainan
Copy link
Member Author

jordipainan commented Nov 23, 2023

Btw, the issue seems to be at

go.vocdoni.io/dvote/vochain/transaction/vochaintx.(*Tx).Unmarshal(0xc01c6335e0, {0x0, 0x0, 0x0}, {0xc002930060, 0xe})
	go.vocdoni.io/dvote/vochain/transaction/vochaintx/vochaintx.go:39 +0x20d
go.vocdoni.io/dvote/vochain.(*BaseApplication).CheckTx(0xc0044d6420, {0x40?, 0x36c0a00?}, 0xc01c62c4a0)
	go.vocdoni.io/dvote/vochain/cometbft.go:196 +0x44a

So the check must exist in the API layer but also on the vochain transaction handler.

added extra checks on comet and to the tx unmarshaling content

vochain/cometbft.go Outdated Show resolved Hide resolved
@jordipainan jordipainan merged commit cc54c3b into main Nov 23, 2023
20 checks passed
@jordipainan jordipainan deleted the fix/1198 branch November 23, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer on Unmarshal Tx
3 participants