3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 02:35:52 +00:00

2738 Commits

Author SHA1 Message Date
Andreas Schildbach
b6975a2760 wallet-tool: Create watching wallet with specific creation date. 2016-03-11 21:00:51 +01:00
Andreas Schildbach
b024f6e571 KeyChainGroup: Small optimization in toString(). 2016-03-11 19:33:09 +01:00
Andreas Schildbach
f70086ae64 Block: toString() cosmetics. 2016-03-11 18:58:23 +01:00
Andreas Schildbach
a22e2f5474 WalletFiles: When saving the wallet, add the 'last block seen' time to the log message. 2016-03-11 18:58:23 +01:00
Andreas Schildbach
eb5605b445 Consistently uppercase constant PARAMS in unit tests, second batch. 2016-03-11 14:28:39 +01:00
Andreas Schildbach
ef0043c41f DeterministicKeyChain: Print birth date of watching key in toString(). 2016-03-11 10:09:01 +01:00
Andreas Schildbach
9aed8ea0a5 For watching wallets, store the key creation time always in the watching key rather than the
DeterministicKeyChain. Creation times in the DeterministicKeyChain can't be persisted to protobuf,
as that structure has no full-blown protobuf equivalent.

This means a couple of DeterministicKeyChain, KeyChainGroup and Wallet factory method variants
that take creation dates have been removed. On the other hand, a convenient
Wallet.fromWatchingKeyB58(params, xpub, creationDate) has been added.

Also adds a test for protobuf-roundtripping watching wallets.

Supposed to fix issue #1209.
2016-03-11 10:08:42 +01:00
Andreas Schildbach
6fcbca10e0 BitcoinURITest: Migrate references to deprecated BitcoinURI.BITCOIN_SCHEME field. 2016-03-10 21:40:59 +01:00
Andreas Schildbach
7ad2da9ab1 Wallet: Hide Wallet(Context, KeyChainGroup) constructor. 2016-03-08 16:33:17 +01:00
Andreas Schildbach
b3583d5d7d Change fee calculation in Wallet.adjustOutputDownwardsForFee():
- Cent rule is removed
- Fee based on feePerKb is calculated on byte precision

This change affects the special cases of emptying and rekeying wallets. Fee calculation of standard transactions is unaffected for now.
2016-03-08 16:02:11 +01:00
Andreas Schildbach
c7462a4541 Sha256Hash: Replace hardcoded 32 values by a LENGTH constant. 2016-03-07 13:07:14 +01:00
Andreas Schildbach
4b75c336bb Sha256Hash: Fix compareTo() not being consistent with equals(). 2016-03-07 12:56:35 +01:00
mruddy
1eaf05cacf Fix core module build failures caused by Maven surefire plugin running JUnit classes.
This removes pull-tester (BitcoindComparisonTool) from the build. If anyone is missing it, we should add it back in the tools sub-project.
2016-03-05 15:06:20 +01:00
Andreas Schildbach
b9102fbf8e Wallet: Fix bug in cleanup() that sometimes would put foreign outputs in myUnspents when disconnecting. This wrongly increases the balance. 2016-03-05 01:13:58 +01:00
Andreas Schildbach
3b99338fb4 Transaction: Put transaction confidence into separate line in toString(). 2016-03-04 14:42:57 +01:00
Andreas Schildbach
83d39b187b Wallet: Print earliest key creation time in toString(). 2016-03-03 16:58:15 +01:00
Andreas Schildbach
660f0b1b24 Wallet: Fix getKeyRotationTime() to return null if unconfigured. 2016-03-03 16:58:09 +01:00
Andreas Schildbach
be1b3f592d Wallet: Log estimated balance after transaction was committed to the wallet and after successful wallet cleanup. 2016-03-02 16:13:04 +01:00
Andreas Schildbach
946bfbee16 PeerGroup: Log when broadcastTransaction() guesses the transaction source. 2016-03-02 11:56:18 +01:00
Andreas Schildbach
6dcff5ff55 Wallet: Rename doesAcceptRiskyTransactions() to isAcceptRiskyTransactions().
And update JavaDocs around risky transactions.
2016-03-02 11:32:29 +01:00
Andreas Schildbach
67e1434b51 Peer: Receiving main protocol messages before version handshake completed is a protocol violation. 2016-03-02 01:04:52 +01:00
Andreas Schildbach
709e6f7562 Peer: Both halves of the version handshake need to be complete before the protocol can continue. 2016-03-02 01:04:52 +01:00
andrewtoth
b2d7b95450 WalletAppKit: Fix old API link in comment. 2016-03-02 01:01:01 +01:00
Andreas Schildbach
e0507fa777 Wallet: In updateForSpends(), when marking an output as spent, log spent-by transaction hash. 2016-03-01 13:26:27 +01:00
Andreas Schildbach
aa5684fcdf Print byte size of transactions in wallet dump. 2016-03-01 09:52:58 +01:00
Andreas Schildbach
d3f45a64cb Replace most of String.format() by StringBuilder. 2016-03-01 00:31:01 +01:00
Andreas Schildbach
315863d4e8 Consistently uppercase constant PARAMS in unit tests. 2016-02-29 22:53:45 +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
7240fb754a InsufficientMoneyException: In the exception message, format missing value as BTC value. 2016-02-29 20:44:00 +01:00
Andreas Schildbach
9e52e4e0bf wallet-template: When constructing the wallet file name from the app's name, replace problematic characters so the filesystem doesn't throw up. 2016-02-29 16:41:49 +01:00
Will Shackleton
2f8c715fdd Fixed NullPointerException in creating new StoredPaymentChannelClientStates 2016-02-29 16:39:53 +01:00
Andreas Schildbach
8818f6ff0c Transaction: Fix wrong line ending in toString(). 2016-02-29 15:58:59 +01:00
Andreas Schildbach
cd830bb128 Print transaction fee per kilobyte besides total fee in wallet dump. 2016-02-27 16:01:49 +01:00
Andreas Schildbach
afffd8b2c7 Peer: Configure maximum recursion level when requesting dependent transactions.
The idea is to limit download to a sane amount, rather than disabling it completely.
2016-02-27 13:15:44 +01:00
Jameson Lopp
4217a5c231 Rename boolean Peer getters to use 'is' prefix. 2016-02-27 13:09:48 +01:00
Will Shackleton
7bb7ab60e1 Added capability to run example payment channels on regtest, test or main nets 2016-02-27 13:00:47 +01:00
Andreas Schildbach
ef3acab8d5 Again reword a happy connect log message. Receiving the remote version message doesn't mean we're connected. 2016-02-26 20:46:36 +01:00
Andreas Schildbach
6226e32fcb Make socket connect log message sound a bit less happy. We still need to handshake for a 'successful' connection. 2016-02-26 19:25:47 +01:00
Andreas Schildbach
b6c6d1213e Wallet.isConsistentOrThrow(): New variant of .isConsistent() that throws an exception describing the inconsistency. 2016-02-19 21:44:32 +01:00
Andreas Schildbach
a1def190ad Peer: Disconnect peers without copy of the block chain gracefully.
Previously, a protocol exception was thrown, spamming error reporting facilities with useless messages.
2016-02-19 21:40:37 +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
Will Shackleton
f6714f1a94 Added getChannelMap method to StoredPaymentChannelClientStates 2016-02-18 22:08:29 +01:00
Will Shackleton
500db4b43f Added getFromWallet method to StoredPaymentChannelServerStates 2016-02-17 15:27:31 +00:00
Andreas Schildbach
a659c68162 Peer: Extract method processPing(). 2016-02-16 16:28:03 +01:00
Andreas Schildbach
d2ae63d01d Peer: Extract method processVersionAck(). 2016-02-16 16:27:32 +01:00
Andreas Schildbach
38848cd1cd TransactionConfidence: Add lastBroadcastedAt, the time a transaction was last announced to us.
The idea of this new field is that if a pending transaction was not announced for a longer time,
it is unlikely to confirm. Thus, the user should be warned and maybe the transaction removed from
the wallet at some point.
2016-02-16 14:09:21 +01:00
Andreas Schildbach
e973c2f5d7 Remove convenience method for BIP101.
The BIP was withdrawn by Gavin. The block test is kept because it can still serve as test data.
2016-02-16 14:05:19 +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
aa33c0e843 PeerGroupTest: Add listeners before calling start()
PeerGroupTest.listener() currently starts the PeerGroup before adding listeners to
it. While the events being listened for are not triggered until later in
the test, it is good practice to add listeners before calling start()
2016-02-13 18:08:06 +01:00
Ross Nicoll
509df8c232 Refactor adding/removing block download listeners 2016-02-13 14:44:49 +00:00