mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
consensus: check transactions count during PrepareRequest verification
This commit is contained in:
parent
23a3514cc0
commit
38103dcc7a
2 changed files with 14 additions and 3 deletions
|
@ -323,6 +323,13 @@ func TestService_PrepareRequest(t *testing.T) {
|
|||
|
||||
sr, err := srv.Chain.GetStateModule().GetStateRoot(srv.dbft.BlockIndex - 1)
|
||||
require.NoError(t, err)
|
||||
|
||||
checkRequest(t, errInvalidTransactionsCount, &prepareRequest{stateRootEnabled: true,
|
||||
prevHash: prevHash,
|
||||
stateRoot: sr.Root,
|
||||
transactionHashes: make([]util.Uint256, srv.ProtocolConfiguration.MaxTransactionsPerBlock+1),
|
||||
})
|
||||
|
||||
checkRequest(t, nil, &prepareRequest{
|
||||
stateRootEnabled: true,
|
||||
prevHash: prevHash,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue