Skip to content

Commit

Permalink
add two v1 signature cases
Browse files Browse the repository at this point in the history
  • Loading branch information
chris124567 authored and lukechampine committed Nov 3, 2023
1 parent f1e65eb commit 457a0bf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions consensus/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,26 @@ func TestValidateBlock(t *testing.T) {
txn.Signatures = append(txn.Signatures, txn.Signatures[0])
},
},
{
"invalid partial signature",
func(b *types.Block) {
txn := &b.Transactions[0]
txn.Signatures[0].CoveredFields.WholeTransaction = false
},
},
{
"invalid partial signature",
func(b *types.Block) {
txn := &b.Transactions[0]
txn.Signatures[0].CoveredFields.WholeTransaction = false
txn.Signatures[0].CoveredFields.SiacoinInputs = []uint64{0}
txn.Signatures[0].CoveredFields.SiacoinOutputs = []uint64{0}
txn.Signatures[0].CoveredFields.SiafundInputs = []uint64{0}
txn.Signatures[0].CoveredFields.SiafundOutputs = []uint64{0}
txn.Signatures[0].CoveredFields.FileContracts = []uint64{0}
txn.Signatures[0].CoveredFields.FileContractRevisions = []uint64{0}
},
},
}
for _, test := range tests {
corruptBlock := deepCopyBlock(validBlock)
Expand Down

0 comments on commit 457a0bf

Please sign in to comment.