Commit Graph

1961 Commits

Author SHA1 Message Date
Mike Hearn
f569e10c17 Peer: reindent lines to match code style. 2014-09-08 18:26:36 +02:00
Mike Hearn
2b01508e10 Peer: fix the case where dependency download is disabled. It wasn't sending transactions to the wallet before. Add a test for this and add accessors for the setting. 2014-09-08 18:24:44 +02:00
Andreas Schildbach
302bb3e21d Use the new Transaction.SORT_TX_BY_UPDATE_TIME comparator and refresh comments. 2014-09-08 13:08:21 +02:00
Andreas Schildbach
2b80e4cfd1 Update script JSON tests from upstream. 2014-09-08 13:07:03 +02:00
Andreas Schildbach
2aa7f25a95 Provide a more meaningful exception when reaching past end of ASN.1 stream. Properly close ASN.1 decoder in exception paths.
A way to trigger the exception is running ScriptTest.dataDrivenValidTransactions().
2014-09-08 13:07:03 +02:00
Mike Hearn
c8803bdefe WalletTest: Better unit test failure message to check if the test is flaky. 2014-09-08 13:01:07 +02:00
Adam Mackler
a3073a0017 Don't bother pointless attempt to construct thread pool with no open circuits. 2014-09-08 12:57:00 +02:00
Andreas Schildbach
56603ff1f9 Fix version message. My heart breaks when I see the bad spelling of our dearest child in the logs. 2014-09-08 12:38:24 +02:00
Kosta Korenkov
c2d19a31a8 Wallet throws on missing signature by default
Using dummy sigs by default may be confusing for multi-sig scenarios.
See: https://groups.google.com/forum/#!topic/bitcoinj/PEhZGk3WMxU
2014-09-05 12:06:55 +02:00
Andreas Schildbach
ae24da4f9c When manually constructing SimpleDateFormat, specify Locale.US or otherwise we may end up on non-latin scripts.
See SimpleDateFormat javadoc for a discussion.
2014-09-04 14:17:23 +02:00
Andreas Schildbach
9f6f630dfb Catch AssertionError when connecting to sockets.
Annoyingly this is thrown on Android when libcore.io.Posix.getsockname() throws libcore.io.ErrnoException, rather than just an IOException.
2014-09-04 12:51:57 +02:00
Mike Hearn
a0d72294a0 Fix a buggy log message and make the comment clearer. 2014-09-03 18:55:10 +02:00
Andreas Schildbach
7d930554a6 Support for recording a memo with transactions. It can be used to record the memo of the payment request that initiated the transaction. Use the new SendRequest.memo register. 2014-09-03 16:13:41 +02:00
Michael Bumann
d09b69ebc5 make DeterministicSeed constructors public 2014-09-02 20:54:01 +02:00
Mike Hearn
d185dd55f1 Try a tweak to the unit tests to make Travis happy. 2014-09-01 17:49:42 +02:00
Mike Hearn
ed75774605 Transaction.verify: make it throw VerificationException subclasses, and add a check for duplicated outpoints.
This check does not have any impact on existing apps as in full verification mode the UTXO set is already effectively performing this check, and general SPV wallets don't verify inputs meaningfully anyway (they could just be random). However it's useful for Lighthouse and can't hurt - a tx with a duplicated outpoint is always invalid.
2014-09-01 17:06:41 +02:00
Mike Hearn
4d18a477dd Transaction.addSignedInput: catch API usage error. 2014-09-01 15:33:58 +02:00
Kosta Korenkov
6579d72bd8 Add SendRequest.missingSigsMode
Instead of useDummySignatures flag there is now a MissingSigMode enum
allowing to specify what to do with missing signatures.

Available modes:
USE_OP_ZERO - do nothing. OP_0 will be left in place of missing
signature
USE_DUMMY_SIG - insert dummy signature in place of missing sig.
THROW - throw an exception. It would be either MissingSignatureException
for P2SH or MissingPrivateKeyException for other tx types

Default mode is USE_DUMMY_SIG (for backward compatibility)
2014-09-01 13:10:51 +07:00
Kosta Korenkov
dc83712d9d Fix DummySigSigner misplaces dummy sig in P2SH scriptSigs 2014-09-01 12:37:39 +07:00
Mike Hearn
e4e8271b47 WalletTemplate: use Tor by default on testnet. 2014-08-28 14:45:36 +02:00
Andreas Schildbach
b1176e0fdf Rename CoinFormat to MonetaryFormat, now that it can deal with Coin and Fiat mostly the same way. 2014-08-28 14:45:36 +02:00
Devrandom
59efe031c4 Orchid: typo 2014-08-28 14:36:08 +02:00
Devrandom
ddfaebd487 Orchid: narrower locking 2014-08-28 14:36:08 +02:00
Devrandom
41731c3261 Orchid: refactor thread pool creation 2014-08-28 14:36:08 +02:00
Devrandom
b6eb96cb44 Orchid: document an issue with pending circuits on shutdown 2014-08-28 14:36:08 +02:00
Devrandom
f57c3a857c Orchid: better thread tracking
also, fix race condition in closing circuits on shutdown
2014-08-28 14:36:08 +02:00
Devrandom
de3665f734 Orchid: fix infinite task creation loop when shutting down 2014-08-28 14:36:08 +02:00
Andreas Schildbach
5be769d4ca Support for applications recording exchange rate that was valid when transaction was sent. Use the new SendRequest.exchangeRate register.
Includes a test.
2014-08-28 14:32:26 +02:00
Mike Hearn
d9be6a62d2 Peer: Add a version handshake future. 2014-08-28 14:26:20 +02:00
Gary Rowe
0ddbbfd5a4 Improved README to use Markdown and provide additional instructions for people getting started 2014-08-27 10:49:57 +01:00
Gary Rowe
58814f6cda Fix JDK8 doclint range to work with JDK7 in Orchid 2014-08-26 11:46:54 +02:00
Gary Rowe
ddf305edd2 Fix JDK8 doclint range to work with JDK7 2014-08-26 11:46:54 +02:00
Mike Hearn
3ec6d30562 Add testnet checkpoints for WalletTemplate. 2014-08-26 11:46:39 +02:00
Mike Hearn
0f48c902d2 Better warning messages for the block store rollback code. It was printing exceptions for replays and new wallets. 2014-08-26 11:46:39 +02:00
Andreas Schildbach
b4e1e2d9ef Remove debug output that slipped in with the last commit. 2014-08-25 15:22:01 +02:00
Andreas Schildbach
f3733cae3b Configure CoinFormat with values from a Locale. 2014-08-25 01:03:59 +02:00
Andreas Schildbach
9e91c54fdd Formatting and parsing of monetary values with non-arabic digits. 2014-08-25 01:03:57 +02:00
Kosta Korenkov
282c25eeb4 Signers: map derivation paths to scriptPubKeys..
.. instead of TransactionInput objects since latter are mutable.
2014-08-24 23:19:09 +02:00
Andreas Schildbach
ad6adea0c5 Overload Script.getToAddress() with a variant that tries harder to determine a destination address.
I ended up duplicating this piece of code several times, so I thought it may be useful to have it in the framework.

Includes tests.
2014-08-24 23:13:20 +02:00
Mike Hearn
308de4edc1 Fix or comment out a few Java 7isms. 2014-08-24 01:02:44 +02:00
Adam Mackler
e2b802235d Extension of java.text.Format for locale-sensitive Bitcoin value formatting & parsing. 2014-08-24 00:35:08 +02:00
Devrandom
887d6b0330 Orchid: fix NPE when unbuilt circuit is closed 2014-08-24 00:06:17 +02:00
Devrandom
50ad0e7666 Fix Orchid deadlock 3
https://github.com/subgraph/Orchid/pull/10
2014-08-24 00:06:17 +02:00
Oscar Guindzberg
2bc8f952e2 Wallet docs: link to github.io not google code 2014-08-23 18:45:02 -03:00
Devrandom
0464aa71c5 Add cycle detecting locks, fix Orchid deadlock 2
https://github.com/subgraph/Orchid/pull/10

Conflicts:
	orchid/src/com/subgraph/orchid/circuits/CircuitIO.java
2014-08-23 21:59:05 +02:00
Devrandom
00d1821daa Fix Orchid deadlock 1
https://github.com/subgraph/Orchid/pull/10
2014-08-23 21:59:05 +02:00
Mike Hearn
46104903fb WalletAppKit: delete dead store. 2014-08-23 21:20:14 +02:00
Mike Hearn
03c8cf5927 Wallet: ban usage of wallet.importKey with deterministic keys. 2014-08-23 20:42:22 +02:00
Mike Hearn
fcdd0115c4 Slightly clearer comment and log message in Script.executeCheckSig. 2014-08-23 13:11:27 +02:00
Mike Hearn
729c716b18 WalletTest: pin creation time of wallet key hierarchy in keyRotationHD test to avoid timing race. Should resolve issue 575. 2014-08-23 13:11:05 +02:00