transaction: forbid serializing invalid transactions
Transaction that has no data is invalid and can't be serialized, so throw an error if someone tries to.
This commit is contained in:
parent
9374c5e7c2
commit
388fed06e5
5 changed files with 25 additions and 14 deletions
|
@ -49,7 +49,7 @@ func TestService_GetVerified(t *testing.T) {
|
|||
|
||||
p := new(Payload)
|
||||
p.SetType(payload.PrepareRequestType)
|
||||
p.SetPayload(&prepareRequest{transactionHashes: hashes})
|
||||
p.SetPayload(&prepareRequest{transactionHashes: hashes, minerTx: *newMinerTx(999)})
|
||||
p.SetValidatorIndex(1)
|
||||
|
||||
priv, _ := getTestValidator(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue