@@ -523,8 +523,6 @@ func TestUtxoValidateValueNotConservedUtxo(t *testing.T) {
523
523
var testInputAmount uint64 = 555666777
524
524
var testFee uint64 = 123456
525
525
var testStakeDeposit uint64 = 2_000_000
526
- var testStakeCred1 = []byte {0x01 , 0x23 , 0x45 }
527
- var testStakeCred2 = []byte {0xab , 0xcd , 0xef }
528
526
testOutputExactAmount := testInputAmount - testFee
529
527
testOutputUnderAmount := testOutputExactAmount - 999
530
528
testOutputOverAmount := testOutputExactAmount + 999
@@ -559,13 +557,6 @@ func TestUtxoValidateValueNotConservedUtxo(t *testing.T) {
559
557
},
560
558
},
561
559
},
562
- MockStakeRegistration : []common.StakeRegistrationCertificate {
563
- {
564
- StakeRegistration : common.StakeCredential {
565
- Credential : testStakeCred2 ,
566
- },
567
- },
568
- },
569
560
}
570
561
testSlot := uint64 (0 )
571
562
testProtocolParams := & babbage.BabbageProtocolParameters {
@@ -590,18 +581,16 @@ func TestUtxoValidateValueNotConservedUtxo(t *testing.T) {
590
581
}
591
582
},
592
583
)
593
- // First stake registration
584
+ // Stake registration
594
585
t .Run (
595
- "first stake registration" ,
586
+ "stake registration" ,
596
587
func (t * testing.T ) {
597
588
testTx .Body .TxOutputs [0 ].OutputAmount .Amount = testOutputExactAmount - testStakeDeposit
598
589
testTx .Body .TxCertificates = []common.CertificateWrapper {
599
590
{
600
591
Type : common .CertificateTypeStakeRegistration ,
601
592
Certificate : & common.StakeRegistrationCertificate {
602
- StakeRegistration : common.StakeCredential {
603
- Credential : testStakeCred1 ,
604
- },
593
+ StakeRegistration : common.StakeCredential {},
605
594
},
606
595
},
607
596
}
@@ -619,18 +608,16 @@ func TestUtxoValidateValueNotConservedUtxo(t *testing.T) {
619
608
}
620
609
},
621
610
)
622
- // Second stake registration
611
+ // Stake deregistration
623
612
t .Run (
624
- "second stake registration " ,
613
+ "stake deregistration " ,
625
614
func (t * testing.T ) {
626
- testTx .Body .TxOutputs [0 ].OutputAmount .Amount = testOutputExactAmount
615
+ testTx .Body .TxOutputs [0 ].OutputAmount .Amount = testOutputExactAmount + testStakeDeposit
627
616
testTx .Body .TxCertificates = []common.CertificateWrapper {
628
617
{
629
618
Type : common .CertificateTypeStakeRegistration ,
630
- Certificate : & common.StakeRegistrationCertificate {
631
- StakeRegistration : common.StakeCredential {
632
- Credential : testStakeCred2 ,
633
- },
619
+ Certificate : & common.StakeDeregistrationCertificate {
620
+ StakeDeregistration : common.StakeCredential {},
634
621
},
635
622
},
636
623
}
0 commit comments