Skip to content

Commit

Permalink
Rename variables in releaseBtc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-iov committed Oct 15, 2024
1 parent d5136e0 commit e17da01
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,8 @@ void low_amount_release_request_rejected_before_lovell() throws IOException {
// Add some extra weis to the value, but less than 1 satoshi.
// To ensure that the pegout value is rounded down to fit in satoshis.
co.rsk.core.Coin oneSatoshiInWeis = co.rsk.core.Coin.fromBitcoin(Coin.SATOSHI);
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(co.rsk.core.Coin.valueOf(1));
co.rsk.core.Coin oneWei = co.rsk.core.Coin.valueOf(Denomination.WEI.longValue());
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(oneWei);
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

bridgeSupport.releaseBtc(buildReleaseRskTx(pegoutRequestValue));
Expand Down Expand Up @@ -1375,7 +1376,8 @@ void contract_caller_release_request_rejected_before_lovell() throws IOException
// Add some extra weis to the value, but less than 1 satoshi.
// To ensure that the pegout value is rounded down to fit in satoshis.
co.rsk.core.Coin oneSatoshiInWeis = co.rsk.core.Coin.fromBitcoin(Coin.SATOSHI);
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(co.rsk.core.Coin.valueOf(1));
co.rsk.core.Coin oneWei = co.rsk.core.Coin.valueOf(Denomination.WEI.longValue());
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(oneWei);
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

bridgeSupport.releaseBtc(buildReleaseRskTx_fromContract(pegoutRequestValue));
Expand Down Expand Up @@ -1422,7 +1424,8 @@ void contract_caller_release_request_rejected_after_lovell() throws IOException
// Add some extra weis to the value, but less than 1 satoshi.
// To ensure that the pegout value is rounded down to fit in satoshis.
co.rsk.core.Coin oneSatoshiInWeis = co.rsk.core.Coin.fromBitcoin(Coin.SATOSHI);
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(co.rsk.core.Coin.valueOf(1));
co.rsk.core.Coin oneWei = co.rsk.core.Coin.valueOf(Denomination.WEI.longValue());
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(oneWei);
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

bridgeSupport.releaseBtc(buildReleaseRskTx_fromContract(pegoutRequestValue));
Expand Down Expand Up @@ -1480,7 +1483,8 @@ void fee_above_value_release_request_rejected_before_lovell() throws IOException
// Add some extra weis to the value, but less than 1 satoshi.
// To ensure that the pegout value is rounded down to fit in satoshis.
co.rsk.core.Coin oneSatoshiInWeis = co.rsk.core.Coin.fromBitcoin(Coin.SATOSHI);
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(co.rsk.core.Coin.valueOf(1));
co.rsk.core.Coin oneWei = co.rsk.core.Coin.valueOf(Denomination.WEI.longValue());
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(oneWei);
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

bridgeSupport.releaseBtc(buildReleaseRskTx(pegoutRequestValue));
Expand Down Expand Up @@ -1543,7 +1547,8 @@ void fee_above_value_release_request_rejected_after_lovell() throws IOException
// Add some extra weis to the value, but less than 1 satoshi.
// To ensure that the pegout value is rounded down to fit in satoshis.
co.rsk.core.Coin oneSatoshiInWeis = co.rsk.core.Coin.fromBitcoin(Coin.SATOSHI);
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(co.rsk.core.Coin.valueOf(1));
co.rsk.core.Coin oneWei = co.rsk.core.Coin.valueOf(Denomination.WEI.longValue());
co.rsk.core.Coin extraWeis = oneSatoshiInWeis.subtract(oneWei);
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

bridgeSupport.releaseBtc(buildReleaseRskTx(pegoutRequestValue));
Expand Down

0 comments on commit e17da01

Please sign in to comment.