diff --git a/rskj-core/src/test/java/co/rsk/peg/RegisterBtcTransactionIT.java b/rskj-core/src/test/java/co/rsk/peg/RegisterBtcTransactionIT.java index b1a79ee5f0..38dbf100d2 100644 --- a/rskj-core/src/test/java/co/rsk/peg/RegisterBtcTransactionIT.java +++ b/rskj-core/src/test/java/co/rsk/peg/RegisterBtcTransactionIT.java @@ -154,7 +154,8 @@ void registerBtcTransaction_whenLegacyBtcTransactionWithNegativeHeight_shouldNot List expectedFederationUTXOs = List.copyOf(federationSupport.getActiveFederationBtcUTXOs()); // Act - bridgeSupport.registerBtcTransaction(rskTx, bitcoinTransaction.bitcoinSerialize(), -1, pmtWithTransactions.bitcoinSerialize()); + int height = -1; + bridgeSupport.registerBtcTransaction(rskTx, bitcoinTransaction.bitcoinSerialize(), height, pmtWithTransactions.bitcoinSerialize()); bridgeSupport.save(); // Assert @@ -163,11 +164,12 @@ void registerBtcTransaction_whenLegacyBtcTransactionWithNegativeHeight_shouldNot } private static UTXO utxoOf(BtcTransaction bitcoinTransaction, TransactionOutput output) { + int height = 0; return new UTXO( bitcoinTransaction.getHash(), output.getIndex(), output.getValue(), - 0, + height, bitcoinTransaction.isCoinBase(), output.getScriptPubKey() ); @@ -175,7 +177,9 @@ private static UTXO utxoOf(BtcTransaction bitcoinTransaction, TransactionOutput private BtcTransaction createPegInTransaction(Address federationAddress, Coin coin, BtcECKey pubKey) { BtcTransaction btcTx = new BtcTransaction(btcNetworkParams); - btcTx.addInput(BitcoinTestUtils.createHash(0), 0, ScriptBuilder.createInputScript(null, pubKey)); + int outputIndex = 0; + int nHash = 0; + btcTx.addInput(BitcoinTestUtils.createHash(nHash), outputIndex, ScriptBuilder.createInputScript(null, pubKey)); btcTx.addOutput(new TransactionOutput(btcNetworkParams, btcTx, coin, federationAddress)); return btcTx; @@ -184,7 +188,8 @@ private BtcTransaction createPegInTransaction(Address federationAddress, Coin co private void assertLogPegInBtc() { Sha256Hash peginTransactionHash = bitcoinTransaction.getHash(); List encodedTopics = getEncodedTopics(BridgeEvents.PEGIN_BTC.getEvent(), rskReceiver.toString(), peginTransactionHash.getBytes()); - byte[] encodedData = getEncodedData(BridgeEvents.PEGIN_BTC.getEvent(), minimumPeginValue.getValue(), 0); + int protocolVersion = 0; + byte[] encodedData = getEncodedData(BridgeEvents.PEGIN_BTC.getEvent(), minimumPeginValue.getValue(), protocolVersion); assertEventWasEmittedWithExpectedTopics(encodedTopics, logs); assertEventWasEmittedWithExpectedData(encodedData, logs);