You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm receiving coin to my wallet. I can see it as estimated balance. After half hour transaction getting 1 confirmation. It coin is still in estimated. Must it be available but it doesn't. This is my wallet app kit initialization:
context = new Context(this.params);
// If seed is non-null it means we are restoring from backup.
bitcoin = new WalletAppKit(context, new File("./wallets/bitcoincash/"), WALLET_FILE_NAME) {
@Override
protected void onSetupCompleted() {
logger.info("Wallet App Kit setup completed.");
// WARN Don't try to spend unconfirmed transaction. Becouse bitcoinj is bullshit.
// getBitcoin().wallet().allowSpendingUnconfirmedTransactions();
getBitcoin().peerGroup().setMinBroadcastConnections(MIN_PEER_COUNT);
getBitcoin().peerGroup().setMaxConnections(15);
WalletCoinsReceivedEventListener walletCoinsReceivedEventListener = new WalletCoinsReceivedEventListener() {
@Override
public synchronized void onCoinsReceived(org.bitcoinj.wallet.Wallet wallet, Transaction tx, Coin prevBalance,
Coin newBalance) {
try {
if (newBalance.value < prevBalance.value)
return;
Context.propagate(createContext());
logger.debug("txid: " + tx.getHashAsString() );
} catch (Exception e) {
e.printStackTrace();
logger.error(e);
}
}
};
getBitcoin().wallet().addCoinsReceivedEventListener(walletCoinsReceivedEventListener);
TransactionConfidenceEventListener transactionConfidenceEventListener = new TransactionConfidenceEventListener() {
@Override
public synchronized void onTransactionConfidenceChanged(org.bitcoinj.wallet.Wallet wallet, Transaction tx) {
try {
logger.debug("Confirmation: " + tx.getConfidence().getDepthInBlocks());
} catch (Exception e) {
e.printStackTrace();
logger.error(e);
}
}
};
getBitcoin().wallet().addTransactionConfidenceEventListener(transactionConfidenceEventListener);
logger.info("Wallet event listeners added.");
}
};
getBitcoin().setAutoSave(true).setDownloadListener(new BitcoinDownloadProgressTracker()).setBlockingStartup(false)
.setUserAgent(Main.WALLET_FILE_NAME_PREFIX, "1.0");
if (seed != null)
getBitcoin().restoreWalletFromSeed(seed);
if (getBitcoin().isChainFileLocked()) {
logger.error("This application is already running and cannot be started twice.");
System.exit(1);
}
getBitcoin().startAsync();
getBitcoin().awaitRunning();
When I try to get wallet info the result is like that:
Probably I found the main problem. Library can't get transaction confidence changes. I can't receive confirmed transaction in onTransactionConfidenceChanged(). Is it about the peer address is wrong?
We may need to see the logs after the transaction was sent.
Transaction confidence changes when the transaction is included in a block (it goes from pending to building). It seems as if your program isn't getting new blocks.
Is the PeerGroup still connected to the Bitcoin Cash work? Was there another problem? The logs may help.
I'm receiving coin to my wallet. I can see it as estimated balance. After half hour transaction getting 1 confirmation. It coin is still in estimated. Must it be available but it doesn't. This is my wallet app kit initialization:
When I try to get wallet info the result is like that:
This is my incoming transaction: https://www.blocktrail.com/tBCC/tx/97e36ee4bd7ad7763502099dc449a4230ca3cf1e458db9e258a7c6845a58714e
This transaction is increased my estimatedBalance value in first come. When it get one confirmation it must be available but it didn't. Where I'm making mistake? Please help. Thanks.
The text was updated successfully, but these errors were encountered: