Skip to content

Commit

Permalink
Update and simplify releaseBtc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcos-iov committed Oct 14, 2024
1 parent 8e07881 commit 33bbbcb
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ void low_amount_release_request_rejected_before_lovell() throws IOException {
co.rsk.core.Coin pegoutRequestValue = co.rsk.core.Coin.fromBitcoin(belowPegoutMinimumValue);
// 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.valueOf(Denomination.satoshisToWeis(1).longValue());
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));
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

Expand Down Expand Up @@ -1374,7 +1374,7 @@ void contract_caller_release_request_rejected_before_lovell() throws IOException
co.rsk.core.Coin pegoutRequestValue = co.rsk.core.Coin.fromBitcoin(BRIDGE_CONSTANTS.getMinimumPegoutTxValue());
// 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.valueOf(Denomination.satoshisToWeis(1).longValue());
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));
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

Expand Down Expand Up @@ -1421,7 +1421,7 @@ void contract_caller_release_request_rejected_after_lovell() throws IOException
co.rsk.core.Coin pegoutRequestValue = co.rsk.core.Coin.fromBitcoin(BRIDGE_CONSTANTS.getMinimumPegoutTxValue());
// 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.valueOf(Denomination.satoshisToWeis(1).longValue());
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));
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

Expand Down Expand Up @@ -1479,7 +1479,7 @@ void fee_above_value_release_request_rejected_before_lovell() throws IOException
co.rsk.core.Coin pegoutRequestValue = co.rsk.core.Coin.fromBitcoin(pegoutRequestValueWithGapAboveFee);
// 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.valueOf(Denomination.satoshisToWeis(1).longValue());
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));
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

Expand Down Expand Up @@ -1542,7 +1542,7 @@ void fee_above_value_release_request_rejected_after_lovell() throws IOException
co.rsk.core.Coin pegoutRequestValue = co.rsk.core.Coin.fromBitcoin(pegoutRequestValueWithGapAboveFee);
// 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.valueOf(Denomination.satoshisToWeis(1).longValue());
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));
pegoutRequestValue = pegoutRequestValue.add(extraWeis);

Expand Down

0 comments on commit 33bbbcb

Please sign in to comment.