3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 18:25:51 +00:00

2347 Commits

Author SHA1 Message Date
Jarl Fransson
1a274ce7a1 SPVBlockStore: Make getFileSize() a static method for computing size before creating/outside instance. 2016-11-27 10:43:57 +01:00
Jan Vornberger
3d06dd9802 Add setter for wallet factory to WalletAppKit. 2016-11-27 10:40:24 +01:00
Andreas Schildbach
7e609a2409 Remove Orchid forked subproject and support for connecting via Tor. 2016-11-25 23:14:39 +01:00
Andreas Schildbach
ba6e65f091 TransactionConfidence: Print source to toString(). 2016-11-23 18:57:49 +01:00
Andreas Schildbach
34e33a194b Monetary: Add parseCoinInexact() and parseFiatInexact() variants that will cut the amount to the smallest unit. 2016-10-30 13:04:39 +01:00
Andreas Schildbach
9c72c86ed1 Monetary: Tiny optimization in parseCoin()/parseFiat(). 2016-10-30 13:04:39 +01:00
Daniel James
1746be6e10 ECKey: Fix violation of equals/hashCode contract.
ECKey violates the equals/hashCode contract for
Java objects. Objects that are equivalent via
the equals method, _must_ have the same hash code.

This is not the case for ECKeys when comparing
the compressed and uncompressed forms of a public key.
The implementation of the `equals` method defines
these objects to be equivalent, but the hashCode
method defined them to be distinct!

Original implementation comes from commit
640db52cf48416db8e2b24b502b3775243ad5162
which contains this bug. [1]

Note that the comment identifies the correct intent:

> Public keys are random already so we can just use a part of them as the hashcode. Read from the start to
> avoid picking up the type code (compressed vs uncompressed) which is tacked on the end.

But the second sentence is incorrect. The first byte (index 0) is the type code
(compressed vs. uncompressed), not “the end”.

The code has since been refactored in commit
9219d8a9b5714cf4e65dc046c70930c86416e65d
but the implementation is effectively
identical. [2]

The fix is simple: use the most-significant four
bytes of the X-coordinate of the public key.

[1](640db52cf4 (diff-b59ef8be77b9148b27a14be59762c0c5R353))
[2](9219d8a9b5 (diff-1849449aac05f7e59de7ebd56efd7f43R1201))
2016-10-30 12:59:47 +01:00
Andreas Schildbach
2f14c76fb8 Wallet.completeTx: Harmonize logging of requested and effective fee/fee rate. 2016-10-27 22:34:50 +02:00
Andreas Schildbach
9cfa0a35a1 Fiat: Fix comments. 2016-10-22 18:37:02 +02:00
Andreas Schildbach
7a1613a48d DeterministicKeyChain: Inline addToBasicChain() method. 2016-09-30 17:45:37 +02:00
Andreas Schildbach
c6418dc06d AbstractBitcoinNetParams.checkDifficultyTransitions: Check we're really on a transition point after finding the way back to the last one. 2016-09-30 17:45:20 +02:00
Andreas Schildbach
eccf14adeb AbstractBitcoinNetParams.checkDifficultyTransitions: More useful exception message when a way back to the last transition point cannot be found. 2016-09-30 17:45:20 +02:00
Andreas Schildbach
7b0641e271 Fix misleading comment about the difficulty adjustment interval. 2016-09-30 17:45:20 +02:00
Andreas Schildbach
266eddca37 DeterministicKeyChain: Include parent keys in toString(). 2016-09-29 16:02:19 +02:00
Andreas Schildbach
a34f41e287 ECKey: If deriving the private keys fails in toString(), print the exception to the message rather than throwing. 2016-09-29 16:01:57 +02:00
Andreas Schildbach
93e5f7c57b SPVBlockStore: Use Charset constant. 2016-09-28 17:44:53 +02:00
Andreas Schildbach
ea7ea3b304 SPVBlockStore: Add constructor for a custom capacity block store. 2016-09-28 17:43:27 +02:00
Andreas Schildbach
aabedaeb8d SPVBlockStore: Rename numHeaders to capacity. 2016-09-28 17:38:19 +02:00
Andreas Schildbach
b70549a5ff SPVBlockstore: Rename NOT_FOUND_MARKER and make it private. 2016-09-28 17:38:19 +02:00
ScripterRon
175aea997d Catch AccessControlException in Secp256k1Context initialization 2016-09-28 17:25:26 +02:00
Jonathan Cross
41a769aa29 Typo: faling => failing 2016-09-26 18:14:14 +02:00
Andreas Schildbach
a7cad0ede4 Update to OkHttp 2.7.5. 2016-09-06 15:28:41 +02:00
Jon Griffiths
3b9a136eca
Fix the comment for PeerGroup.getPingIntervalMsec() 2016-08-28 02:29:02 +12:00
Andreas Schildbach
faf8d7fabf Refresh bundled checkpoints. 2016-08-27 12:11:31 +02:00
Oscar Guindzberg
00c03e1c05 TransactionInput.disconnect() - make it work for UTXO based wallet 2016-08-26 18:26:13 +02:00
Oscar Guindzberg
0566917a8f Make UTXO serializable 2016-08-25 21:37:46 +02:00
Jon Griffiths
cbe57555b2 Expose the DeterministicKey ctors used by serialisation
These ctors are the only way to construct a key without a parent
but with a depth that matches the path passed in. The ctors taking
parents set the depth to 0 when parent is null. Whether this is
desirable is not clear; exposing the other ctors seems a lower risk
change given the comments in this file that detail support for depth
not matching the path length.

The use case for this change is interfacing with APIs that allow
derivation of children from a path without returning the intermediate
keys. In this case we have no parent to pass to the ctor but we want
to create a correct DeterministicKey for interop with the rest of bitcoinj.
2016-08-25 10:41:23 +02:00
Andreas Schildbach
5883cf9ddb Always use utility method in KeyCrypterScrypt for determining the scrypt salt. 2016-08-23 23:10:46 +02:00
Andreas Schildbach
55fe6fe6c9 KeyCrypterScrypt: Bump up recommendation for number of iterations on mobile devices. 2016-08-19 22:41:58 +02:00
Andreas Schildbach
9c9e3a9744 KeyCrypterScrypt: Log time taken for deriving key from password. 2016-08-19 22:28:50 +02:00
Andreas Schildbach
d876ea9d34 WalletTest: Remove redundant logging. 2016-08-17 21:29:21 +02:00
Andreas Schildbach
a22b5d6634 Add transaction confidence back to Wallet.toString().
When working with Wallet objects, you should use Context too.
2016-08-17 15:01:11 +02:00
Eric Winer
05a4f5b2a4 Transaction: Remove confidence (and Context requirement) from Transaction.toString() 2016-08-17 08:45:47 -04:00
cyberzac
2e0e81d3a2 Payment channels: Added ClientChannelProperties and ServerChannelProperties to allow configuration of the channels. 2016-08-12 09:48:59 +02:00
Andreas Schildbach
7e3dbd5f5d Peer: Log fast catchup time and height of first block to pass it. 2016-08-11 22:14:06 +02:00
Andreas Schildbach
af0d2042d8 Transaction: Print update time in toString(). 2016-08-11 22:14:06 +02:00
Andreas Schildbach
5829b32535 Wallet: In wallet transactions dump, reformat value line. 2016-08-11 22:14:06 +02:00
Andreas Schildbach
a772addc25 TransactionConfidence: Print lastBroadcastedAt in toString(). 2016-08-11 22:14:06 +02:00
Andreas Schildbach
4398745565 Add an AbstractBitcoinNetParams.isRewardHalvingPoint(int height) method. 2016-08-11 22:14:06 +02:00
Andreas Schildbach
2e4d64876d Make AbstractBitcoinNetParams.isDifficultyTransitionPoint(int height) public. 2016-08-11 22:14:06 +02:00
Andreas Schildbach
67c3d4d0e2 KeyCrypterScrypt: Print Scrypt iterations in toString(). 2016-08-11 22:14:06 +02:00
Andreas Schildbach
8c0cfaeee7 Clean up some line endings. 2016-08-11 22:14:06 +02:00
Greg Laun
b3bb2c53c9 DatabaseFullPrunedBlockStore, MySQLFullPrunedBlockStore: Fix spelling. 2016-07-18 17:37:47 -04:00
Oscar Guindzberg
82ae8088de Disable retargeting for regtest 2016-07-03 19:09:38 +02:00
Oscar Guindzberg
17aa1bdaa8 WalletAppKit: Checkpoints doc link 2016-07-03 19:07:45 +02:00
Andreas Schildbach
f416dec2ea Wallet: Fix precondition for transaction confidence of transactions in the pending pool. They can now also be IN_CONFLICT. 2016-06-08 14:23:27 +02:00
Andreas Schildbach
e99d983497 Replace "The bitcoinj developers" copyright statement by the generic statement. There is no such legal entitiy. 2016-06-06 21:32:02 +02:00
Andreas Schildbach
3773a4343c Add a generic copyright statement to all license headers that don't have one.
Note it is not legally necessary to state copyright, but we think it makes things easier.
2016-06-06 21:32:02 +02:00
johnygeorge
f33432febd ScriptBuilder: Make OP_RETURN to allow 80 bytes.
Make OP_RETURN to allow 80 bytes instead of the previous 40 bytes.

This is to be consistent with the Bitcoin Core, which have made it back to 80 bytes.
2016-06-06 21:30:34 +02:00
Andreas Schildbach
85e6a3438a Wallet.setTransactionBroadcaster(): Error message for precondition. 2016-06-04 11:42:46 +02:00