diff --git a/test/e2e/bcd_consumer_integration/clientcontroller/babylon/babylon.go b/test/e2e/bcd_consumer_integration/clientcontroller/babylon/babylon.go index 5f8df7e0..c105836e 100644 --- a/test/e2e/bcd_consumer_integration/clientcontroller/babylon/babylon.go +++ b/test/e2e/bcd_consumer_integration/clientcontroller/babylon/babylon.go @@ -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, @@ -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, diff --git a/test/e2e/bcd_consumer_integration_test.go b/test/e2e/bcd_consumer_integration_test.go index d19b3c29..0f66fe25 100644 --- a/test/e2e/bcd_consumer_integration_test.go +++ b/test/e2e/bcd_consumer_integration_test.go @@ -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) @@ -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() @@ -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