-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.bitcoinj.core.InsufficientMoneyException: Insufficient money, missing 0.01001546 BCH #35
Comments
To diagnose the issue, more information is needed. What do your logs say? How many peers do you have? How many confirmations are on the last transaction? |
I found seedCode unchanged, but when the current address receives a transaction, the address returned by the wallet.currentReceiveAddress will be changed, so when I use this purse to turn out, the address becomes a new address. The new address account balance is 0. How should I use the amount I receive when I receive the amount of the account? The current address is transferred out of the transaction? |
If you are using the Wallet class, it handles all of this for you. If you create a Wallet with a seed (DeterministicSeed) and call wallet.currentReceiveAddress() it will return m/0'/0'/0 (the first address of the external chain of account 0). Once m/0'/0'/0 receives a transaction, wallet.currentReceiveAddress() returns the next unused address m/0'/0'/1. At this point your wallet contains: If your next task to to send a transaction, the wallet will determine that you will send the coins from the first address (m/0'/0'/0) and will place the change if any in m/0'/1'/0 (the first address of the internal chain of account 0). At this point your wallet contains: Not sure if this helps you. There is a wallet dump function which can give more detailed information on the transactions and the addresses and their HD paths. |
The above is my code, I use TestNet to transfer to my wallet address mhCHrjrvtjnv1of8EN6ffGUe1iazeQUc7i, and then when the code is executed again, the balance of the wallet is rich, but when I turn out, the account balance is insufficient and the wallet information has several addresses. How should I make it correct Transfer your wallet with your wallet? Is there any problem with my code? Thank you very much. The following is the log: Wallet containing 6.47998695 BCH (spendable: 0.00 BCH) in: Keys:
Apr 25, 2018 4:32:39 AM org.bitcoinj.wallet.Wallet completeTx This is a transfer record:https://www.blocktrail.com/tBCC/tx/a9d8ad9c9ec346049063c512cff98d3d86c138d2e0b5f8bbde9eb395dff450a4 |
I answered this in #36. The issue appears to be caused by not broadcasting transactions. |
https://www.blocktrail.com/tBCC/address/mnzWQVW2iwgNccCW9VgfuW94PuK1vL17uV
Account balances are adequate, and transfers always indicate insufficient balance. The balance found through the import wallet is also correct. Why?
org.bitcoinj.core.InsufficientMoneyException: Insufficient money, missing 0.01001546 BCH
The text was updated successfully, but these errors were encountered: