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

2521 Commits

Author SHA1 Message Date
Andreas Schildbach
6841fceabc Transaction.getFee(): Do not determine fee on incomplete transactions. 2017-06-02 15:32:42 +02:00
Andreas Schildbach
e62275d41b Update to Guava 22.0-android. This raises the Java API requirement to 1.7. 2017-05-31 16:37:04 +02:00
Saulius Beinorius
943a139d08 Fix for irrelevant double spend causing protobuf serialization issues
Fixes #1374. Previously, transactions could have spentBy set but the spending transaction
dropped as being irrelevant. This would then be serialized to protobuf but could not be
deserialized.
2017-05-28 10:54:08 +02:00
Andreas Schildbach
9bde092143 Utils: Don't allow passing null into bigIntegerToBytes(). 2017-05-16 19:35:54 +02:00
Andreas Schildbach
35b1028656 ScriptBuilder: Replace redundant code. 2017-04-06 16:41:19 +02:00
Thomas König
b890c9a9a1 ScriptBuilder: Fix number encoding for 16. It must be encoded with smallNum(). 2017-04-06 16:39:54 +02:00
Oscar Guindzberg
e51428dcf6 Add "Recipients pay fees" feature to Wallet.completeTx(). There is a new SendRequest.recipientsPayFees field you can use.
Part of this code was written by @m-sossich.
2017-03-23 21:07:10 +01:00
Andreas Schildbach
ce07ceabc4 BIP32Test: New test vector, see https://github.com/bitcoin/bips/pull/497 2017-03-06 10:14:18 +01:00
Andreas Schildbach
7eb6854627 PeerAddress: Fix a constructor was hardcoded to the mainnet port. 2017-03-01 12:29:57 +01:00
Andreas Schildbach
53a71d7379 Transaction: Update DEFAULT_TX_FEE. Fees have risen considerably. 2017-03-01 00:09:01 +01:00
Oscar Guindzberg
4922036ae2 Wallet: Adjust lastCalculatedSize comment. The 1000 byte boundary is no longer used. 2017-02-28 23:52:07 +01:00
Andreas Schildbach
9e72e72ef4 Update to OkHttp 3.6.0. 2017-02-12 17:28:55 +01:00
Andreas Schildbach
b7233f1245 Transaction: Print transaction version to toString(). 2017-02-05 18:42:38 +01:00
Andreas Schildbach
be09b62062 WalletProtobufSerializer: Fix protobuf deserialization of transaction version. 2017-02-05 18:15:27 +01:00
Andreas Schildbach
380abd0d52 PeerAddress: Remove mostly unused setters to make the class more immutable. 2017-01-10 11:51:37 +01:00
Andreas Schildbach
88fec4e937 VersionMessage: Use Guava InetAddresses for localhost address. 2017-01-10 11:28:59 +01:00
Andreas Schildbach
9cbc45aeea PeerAddress: Require NetworkParameters in constructors. 2017-01-10 11:23:25 +01:00
Andreas Schildbach
3177bd52a2 If possible, use generic type inference for constructing objects. 2017-01-09 18:03:07 +01:00
Andreas Schildbach
a06956c6e1 Update core to Java7. We still need to target the Java6 API though, in order to stay compatible with Android. 2017-01-09 18:02:20 +01:00
Andreas Schildbach
09b8ae4adf Update seeds for mainnet and testnet. Seeds are copied from Bitcoin Core 0.13.1. 2016-12-01 12:43:54 +01:00
Andreas Schildbach
2cda567a53 Update to Bouncy/Spongy Castle 1.52. 2016-11-27 11:02:40 +01:00
Jarl Fransson
22beb447d1 WalletProtobufSerializer: Add property to require all found wallet extensions to be known when loading wallet.
Corrected copy pasted text, add warning when ignoring extension due to parsing failure.
2016-11-27 10:59:19 +01:00
Jarl Fransson
072106a53b Improve exception logging for some general exception handlers. 2016-11-27 10:57:25 +01:00
Jarl Fransson
814248a966 Context: Make members final. Make event horizon default value 100 into static constant.
This change makes all fields in a Context instance final to simplify and make the rules clearer. The fields are not meant to be updated as the Context object is propagated in different threads as Thread Local Storage. Even if that mechanism gets removed later, different set of values (in the same process) should be represented as different Context instances.
2016-11-27 10:50:28 +01:00
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