Skip to content

Commit

Permalink
Merge branch 'rebase-devnet-5' into rebase-devnet-5-debug-ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianElvis committed Nov 20, 2024
2 parents 90cc60a + a7febbd commit 52057e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ func (bc *BabylonController) CreateBTCDelegation(
pop *btcstakingtypes.ProofOfPossessionBTC,
stakingTime uint32,
stakingValue int64,
stakingTxInfo *btcctypes.TransactionInfo,
stakingTx []byte,
stakingTxInclusionProof *btcstakingtypes.InclusionProof,
slashingTx *btcstakingtypes.BTCSlashingTx,
delSlashingSig *bbntypes.BIP340Signature,
unbondingTx []byte,
Expand All @@ -299,7 +300,8 @@ func (bc *BabylonController) CreateBTCDelegation(
FpBtcPkList: fpBtcPks,
StakingTime: stakingTime,
StakingValue: stakingValue,
StakingTx: stakingTxInfo.Transaction,
StakingTx: stakingTx,
StakingTxInclusionProof: stakingTxInclusionProof,
SlashingTx: slashingTx,
DelegatorSlashingSig: delSlashingSig,
UnbondingTx: unbondingTx,
Expand Down
13 changes: 7 additions & 6 deletions test/e2e/bcd_consumer_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,8 @@ func (s *BCDConsumerIntegrationTestSuite) createBabylonDelegation(babylonFp *bst
)

stakingMsgTx := testStakingInfo.StakingTx
stakingTxBytes, err := bbntypes.SerializeBTCTx(stakingMsgTx)
s.NoError(err)
stakingTxHash := stakingMsgTx.TxHash().String()
stakingSlashingPathInfo, err := testStakingInfo.StakingInfo.SlashingPathSpendInfo()
s.NoError(err)
Expand Down Expand Up @@ -689,10 +691,7 @@ func (s *BCDConsumerIntegrationTestSuite) createBabylonDelegation(babylonFp *bst
}
_, err = s.babylonController.InsertBtcBlockHeaders(headers)
s.NoError(err)
btcHeader := blockWithStakingTx.HeaderBytes
serializedStakingTx, err := bbntypes.SerializeBTCTx(testStakingInfo.StakingTx)
s.NoError(err)
stakingTxInfo := btcctypes.NewTransactionInfo(&btcctypes.TransactionKey{Index: 1, Hash: btcHeader.Hash()}, serializedStakingTx, blockWithStakingTx.SpvProof.MerkleNodes)
inclusionProof := bstypes.NewInclusionProofFromSpvProof(blockWithStakingTx.SpvProof)

// generate BTC undelegation stuff
stkTxHash := testStakingInfo.StakingTx.TxHash()
Expand Down Expand Up @@ -728,14 +727,16 @@ func (s *BCDConsumerIntegrationTestSuite) createBabylonDelegation(babylonFp *bst
pop,
uint32(stakingTimeBlocks),
stakingValue,
stakingTxInfo,
stakingTxBytes,
inclusionProof,
testStakingInfo.SlashingTx,
delegatorSig,
serializedUnbondingTx,
uint32(unbondingTime),
unbondingValue,
testUnbondingInfo.SlashingTx,
delUnbondingSlashingSig)
delUnbondingSlashingSig,
)
s.NoError(err)

return czDelBtcPk, stakingTxHash
Expand Down

0 comments on commit 52057e5

Please sign in to comment.