@@ -479,7 +479,7 @@ impl Validator {
479
479
) {
480
480
let input = tx. input . get ( input_index as usize ) . expect ( "input" ) ;
481
481
let mut spaceout = stxo. previous_output ;
482
- let space_ref = spaceout. space . as_mut ( ) . unwrap ( ) ;
482
+ let space_ref = spaceout. space . as_ref ( ) . unwrap ( ) ;
483
483
// Handle bid spends
484
484
if space_ref. is_bid_spend ( tx. version , input) {
485
485
// Bid spends must have an auctioned output
@@ -526,7 +526,7 @@ impl Validator {
526
526
None
527
527
} ;
528
528
529
- space_ref . covenant = Covenant :: Bid {
529
+ let new_covenant = Covenant :: Bid {
530
530
signature : auctioned_output. bid_psbt . signature ,
531
531
total_burned : total_burned + auctioned_output. bid_psbt . burn_amount ,
532
532
burn_increment : auctioned_output. bid_psbt . burn_amount ,
@@ -542,11 +542,16 @@ impl Validator {
542
542
txid : auctioned_output. bid_psbt . outpoint . txid ,
543
543
spaceout : auctioned_spaceout,
544
544
} ;
545
- fullspaceout. spaceout . space = Some ( spaceout. space . unwrap ( ) ) ;
545
+ let mut updated_space = spaceout. space . clone ( ) . unwrap ( ) ;
546
+ updated_space. covenant = new_covenant;
547
+ fullspaceout. spaceout . space = Some ( updated_space) ;
546
548
547
549
if !fullspaceout. verify_bid_sig ( ) {
548
550
changeset. updates . push ( UpdateOut {
549
- output : fullspaceout,
551
+ output : FullSpaceOut {
552
+ txid : input. previous_output . txid ,
553
+ spaceout,
554
+ } ,
550
555
kind : UpdateKind :: Revoke ( RevokeReason :: BidPsbt ( BidPsbtReason :: BadSignature ) ) ,
551
556
} ) ;
552
557
return ;
0 commit comments