mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-22 20:26:50 +00:00
Migration to Java 11
Updated pom.xml. Updated dependencies, including various minor code mods, esp. bitcoin-related. Starts up and talks to Java 8 nodes! Dev environment should be at least Eclipse 4.11 with m2e 1.9.1+
This commit is contained in:
@@ -226,7 +226,7 @@ public class BTC {
|
||||
protected Wallet createEmptyWallet() {
|
||||
ECKey dummyKey = new ECKey();
|
||||
|
||||
KeyChainGroup keyChainGroup = new KeyChainGroup(params);
|
||||
KeyChainGroup keyChainGroup = KeyChainGroup.createBasic(params);
|
||||
keyChainGroup.importKeys(dummyKey);
|
||||
|
||||
Wallet wallet = new Wallet(params, keyChainGroup);
|
||||
@@ -242,12 +242,12 @@ public class BTC {
|
||||
WalletCoinsReceivedEventListener coinsReceivedListener = new WalletCoinsReceivedEventListener() {
|
||||
@Override
|
||||
public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance) {
|
||||
System.out.println("Coins received via transaction " + tx.getHashAsString());
|
||||
System.out.println("Coins received via transaction " + tx.getTxId().toString());
|
||||
}
|
||||
};
|
||||
wallet.addCoinsReceivedEventListener(coinsReceivedListener);
|
||||
|
||||
Address address = Address.fromBase58(params, base58Address);
|
||||
Address address = Address.fromString(params, base58Address);
|
||||
wallet.addWatchedAddress(address, startTime);
|
||||
|
||||
StoredBlock checkpoint = manager.getCheckpointBefore(startTime);
|
||||
|
@@ -385,7 +385,6 @@ public class HSQLDBRepository implements Repository {
|
||||
* @return ResultSet, or null if there are no found rows
|
||||
* @throws SQLException
|
||||
*/
|
||||
@SuppressWarnings("resource")
|
||||
public ResultSet checkedExecute(String sql, Object... objects) throws SQLException {
|
||||
PreparedStatement preparedStatement = this.prepareStatement(sql);
|
||||
|
||||
|
@@ -3,6 +3,7 @@ package org.qora.transaction;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
import java.math.MathContext;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
@@ -347,7 +348,7 @@ public abstract class Transaction {
|
||||
if (recommendedFee.compareTo(BlockChain.getInstance().getUnitFee()) <= 0) {
|
||||
recommendedFee = BlockChain.getInstance().getUnitFee();
|
||||
} else {
|
||||
recommendedFee = recommendedFee.setScale(0, BigDecimal.ROUND_UP);
|
||||
recommendedFee = recommendedFee.setScale(0, RoundingMode.CEILING);
|
||||
}
|
||||
|
||||
return recommendedFee.setScale(8);
|
||||
|
Reference in New Issue
Block a user