accounting: implement SignedDataSource on DeleteRequest message

This commit is contained in:
Leonard Lyubich 2020-05-11 13:29:04 +03:00
parent 81f537cda8
commit 3fb293543f
4 changed files with 129 additions and 0 deletions

View file

@ -119,6 +119,37 @@ func TestSignBalanceRequest(t *testing.T) {
},
},
},
{
constructor: func() sigType {
return new(DeleteRequest)
},
payloadCorrupt: []func(sigType){
func(s sigType) {
req := s.(*DeleteRequest)
id, err := NewChequeID()
require.NoError(t, err)
req.SetID(id)
},
func(s sigType) {
req := s.(*DeleteRequest)
owner := req.GetOwnerID()
owner[0]++
req.SetOwnerID(owner)
},
func(s sigType) {
req := s.(*DeleteRequest)
mid := req.GetMessageID()
mid[0]++
req.SetMessageID(mid)
},
},
},
}
for _, item := range items {