fix(V1): Nil extension fix (#125)

This commit is contained in:
David Terpay 2023-05-09 18:04:10 -04:00 committed by GitHub
parent 7797110514
commit 7b426a3aea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -79,7 +79,7 @@ func (h *VoteExtensionHandler) ExtendVoteHandler() ExtendVoteHandler {
}
}
return &ResponseExtendVote{VoteExtension: nil}, nil
return &ResponseExtendVote{VoteExtension: []byte{}}, nil
}
}

View File

@ -28,21 +28,21 @@ func (suite *ABCITestSuite) TestExtendVoteExtensionHandler() {
"empty mempool",
func() []byte {
suite.createFilledMempool(0, 0, 0, false)
return nil
return []byte{}
},
},
{
"filled mempool with no auction transactions",
func() []byte {
suite.createFilledMempool(100, 0, 0, false)
return nil
return []byte{}
},
},
{
"mempool with invalid auction transaction (too many bundled transactions)",
func() []byte {
suite.createFilledMempool(0, 1, int(params.MaxBundleSize)+1, true)
return nil
return []byte{}
},
},
{
@ -61,7 +61,7 @@ func (suite *ABCITestSuite) TestExtendVoteExtensionHandler() {
suite.Require().NoError(err)
// this should return nothing since the top bid is not valid
return nil
return []byte{}
},
},
{
@ -76,7 +76,7 @@ func (suite *ABCITestSuite) TestExtendVoteExtensionHandler() {
suite.createFilledMempool(100, 100, 2, true)
return nil
return []byte{}
},
},
{
@ -95,7 +95,7 @@ func (suite *ABCITestSuite) TestExtendVoteExtensionHandler() {
suite.Require().NoError(err)
// this should return nothing since the top bid is not valid
return nil
return []byte{}
},
},
{