Commit Graph

204 Commits

Author SHA1 Message Date
Andreas Schildbach
4e29e4fb00 Wallet: Make SendRequest a top level class. 2016-04-01 22:03:14 +02:00
Andreas Schildbach
1e66b9a8e3 Finish moving wallet related classes to .wallet package.
These classes are moved to .wallet:
- Wallet + WalletTest
- WalletExtension + WalletExtensionsTest
- WalletProtobufSerializer
- UnreadableWalletException

These classes are moved to .wallet.listeners:
- WalletEventListener
- WalletChangeEventListener
- WalletCoinsReceivedEventListener
- WalletCoinsSentEventListener
- WalletReorganizeEventListener
- ScriptsChangeEventListener
- AbstractWalletEventListener
- KeyChainEventListener
- AbstractKeyChainEventListener
2016-04-01 21:44:30 +02:00
Andreas Schildbach
c1938fec75 Harmonize license headers. 2016-03-26 19:55:05 +01:00
Andreas Schildbach
01365ca00b Introduce a Transaction.DEFAULT_TX_FEE and use it as a default for sends and for wallet maintenance.
Previously we were using Transaction.REFERENCE_DEFAULT_MIN_TX_FEE which is the absolute minimum but it can be
too low. This value should be adjusted from time to time; we're starting with 0.1 mBTC.
2016-03-25 13:35:33 +01:00
Andreas Schildbach
c3b19bd5cd Wallet: Get rid of the concept of a "base fee". Fee is always expressed as a rate in Coin per 1000 bytes.
SendRequest.fee was removed; use SendRequest.feePerKb for requesting a specific fee rate. If the field
was read for knowing the calculated fee, use SendRequest.tx.getFee() instead.

Also makes a couple of unit tests independent of fee and renames the wallet-tool option --fee to
--fee-per-kb.
2016-03-12 17:37:31 +01:00
Andreas Schildbach
d6002e1ee4 wallet-tool: Properly initialize context. 2016-03-11 21:00:56 +01:00
Andreas Schildbach
814bad4efb wallet-tool: Use checkpoints to speed up the blockchain sync. 2016-03-11 21:00:56 +01:00
Andreas Schildbach
b6975a2760 wallet-tool: Create watching wallet with specific creation date. 2016-03-11 21:00:51 +01:00
Andreas Schildbach
c4ea9c95e5 Use Message.unsafeBitcoinSerialize() whenever it's very clear we won't modify the array. 2016-02-29 22:16:01 +01:00
Andreas Schildbach
39f0675866 WalletTool: Fix failing precondition on actions that don't start the PeerGroup. 2016-02-19 21:00:15 +01:00
Ross Nicoll
ea3713ec85 Split PeerConnectionEventListener
Split PeerConnectionEventListener into individual connect, disconnect
and discovery listeners.
Remove custom listener registration from Peer, as now it's possible to
register a connect listener only, without a disconnect listener.
2016-02-13 18:18:56 +00:00
Ross Nicoll
3d3dd6f721 Split peer event listeners into single method interfaces 2016-02-13 15:10:12 +01:00
Will Shackleton
8af0fa9884 Implemented version 2 of payment channels API
I implemented version 2 of the payment channels API using
OP_CHECKLOCKTIMEVERIFY-style payment channels.
2016-02-10 11:15:35 +01:00
Ross Nicoll
aca39ee9de Split wallet events into single method interfaces 2016-02-06 20:01:38 +01:00
Will Shackleton
c9cce47962 Support CLTV micropayment channels
Also extend WalletTool to send via, settle and refund these channels.
2016-01-18 15:57:27 +01:00
Kirill Vlasov
0de458db45 Strings literals should be placed on the left side when checking for equality 2016-01-06 14:19:20 +01:00
Andreas Schildbach
79d6716120 Wallet-Tool: New action to modify the creation time of wallets.
This is useful for repairing wallets that accidently have been created "in the future".
2015-11-27 16:54:55 +01:00
Andreas Schildbach
bb9c93c9b1 TestFeeLevel: Print the number of peers already connected. 2015-10-13 12:29:06 +02:00
Andreas Schildbach
91a49e66dd TestFeeLevel: 50 connections can take too long to build these days, so halve that value. Should still be enough for transaction propagation. 2015-10-13 12:06:53 +02:00
Mike Hearn
7014810cf6 Peer: Break out the onTransactionBroadcast event into a separate interface. 2015-09-18 21:10:53 +01:00
Matt Bogosian
66a851bd30 Fix #1078. Add ability to load Wallet without loading its transactions. Use new methods with wallet-tool reset (where transactions are deleted anyway) and with wallet-tool sync (if the --force option is provided). 2015-09-04 18:07:26 +02:00
Oscar Guindzberg
fe7b703237 Wallet: Rename attribute "keychain" to "keyChainGroup". 2015-08-20 09:37:30 +02:00
Ross Nicoll
ecbd021167 Refactor listener interfaces.
Refactor listener interfaces into their own package.
Split listener interfaces into smaller interfaces.
Make abstract implementations actually abstract.
Rearrange methods for adding listeners to put executor first.
2015-08-08 15:37:46 +02:00
Andreas Schildbach
bd080ac5e4 BuildCheckpoints: Print time of checkpoint blocks. 2015-08-08 15:20:32 +02:00
Andreas Schildbach
7f2645fe16 BuildCheckpoints: Add option for peer to connect to. 2015-08-08 15:20:15 +02:00
Andreas Schildbach
e978ff4997 Add help text to BuildCheckpoints. 2015-08-07 17:20:22 +02:00
Andreas Schildbach
0e7819d1bf Add build-checkpoints shell wrappers. 2015-08-07 17:01:11 +02:00
Andreas Schildbach
16465d9310 Fix licenses for tools and examples. 2015-08-07 16:45:18 +02:00
Devrandom
044c98e096 Support testnet and regtest in BuildCheckpoints tool. 2015-08-07 13:18:53 +02:00
Andreas Schildbach
0441b38599 Provide a consistent fromBase58/toBase58 API for the VersionChecksummedBytes hierarchy.
Deprecates the old constructors and migrates bitcoinj itself to use the new API. Also makes DumpedPrivateKey use WrongNetworkException when appropriate. Adds missing testcases and corrects/adds a bit of JavaDoc.
2015-07-18 13:53:59 +02:00
Andreas Schildbach
2483d10ad3 TestFeeLevel: Make number of ouputs configurable by tweaking a constant. 2015-07-11 20:23:58 +02:00
Andreas Schildbach
621975556c TestFeeLevel: Create transactions with two outputs (and thus most of the time two inputs). This is more close to standard wallet transactions. 2015-07-09 11:27:41 +02:00
Andreas Schildbach
24de5e2a40 0.14-SNAPSHOT 2015-07-06 09:54:04 +02:00
Amichai Rothman
dc94018992 Fix misc. formatting/style/syntax inconsistencies and issues. 2015-06-30 12:45:59 +02:00
Amichai Rothman
faf92971dd Refactored Sha256Hash API:
- depracated constructors
- wrap methods to wrap given hash values in a new instance
- of/twiceOf methods to calculate hash values in a new instance
- hash/hashTwice to calculate hash values and return the raw bytes
2015-06-24 15:21:14 +02:00
Amichai Rothman
a6601066dd moved sha256-related utility methods into Sha256Hash class and renamed them 2015-06-24 15:21:14 +02:00
Amichai Rothman
2fd96c7771 extracted common Utils.newSha256Digest() method to reduce boilerplate code 2015-06-24 15:21:13 +02:00
Andreas Schildbach
07f6b0ea30 Don't print log messages when testing fee level. 2015-06-16 22:46:15 +02:00
Andreas Schildbach
3588fa085c Make BuildCheckpoints print a bit sooner that it's doing something. 2015-05-27 16:40:29 +02:00
Andreas Schildbach
dba18dfb4d Update to slf4j 1.7.7. 2015-04-17 16:37:13 +02:00
Andreas Schildbach
59b426afe0 Increase wallet autosave delay for wallet-tool and WalletAppKit. Since we have some recovery for out-of-sync wallets in place, we can afford to save less often. 2015-03-12 18:07:51 +01:00
Mike Hearn
bef4980abd (API CHANGE) Return a TransactionBroadcast object from PeerGroup.broadcastTransaction.
Old code can be updated by simply calling future() on the returned object to get the previous result.

TransactionBroadcast now has a progress reporting interface, which is ideal for connection to progress bars, pie charts, whatever else you want to use in the UI for showing the progress of sending money/broadcasting a tx.
2015-02-20 15:01:54 +01:00
Mike Hearn
1efa1442c8 (API CHANGE) Pass the FilteredBlock into PeerEventListener.onBlocksDownloaded when present.
Keep track of downloaded vs server-side filtered transactions per second.
Add a keyboard shortcut to wallet-template to force disconnection from the current peer.
2015-02-17 17:02:57 +01:00
Andreas Schildbach
815c4b9ced Add current-receive-addr action to wallet-tool. 2015-02-03 00:18:45 +01:00
Mike Hearn
cd7dc3e535 Don't print logging messages when calculating checkpoints. 2015-01-12 16:53:45 +01:00
Andreas Schildbach
121d2fcb63 Change the WatchMempool pool to build statistics about risk analysis. Removes the pay-to-pubkey detection which was in there. 2015-01-02 17:30:24 +01:00
Mike Hearn
f82f160c2c PeerGroup: configure peer as download peer even when there is no chain, but don't configure download params as that would trigger block fetch. 2014-12-21 14:03:13 +01:00
Mike Hearn
8f219ff458 WatchMempol: fix a regression 2014-12-21 13:57:17 +01:00
Mike Hearn
b25899de58 Rename DownloadListener to DownloadProgressTracker 2014-12-18 13:59:50 +01:00
Andreas Schildbach
478fb5dac9 Fix Integer to long casting compiler error for Eclipse. 2014-12-08 20:39:04 +01:00