Commit graph

2308 commits

Author SHA1 Message Date
Andreas Schildbach
acad3e985d Don't spam the log with setting key rotation time while loading wallets. Instead, print it with the wallet dump. 2014-11-24 15:00:01 +01:00
Mike Hearn
1db2316fc3 More attempts to fix build flakes. 2014-11-24 14:42:02 +01:00
Mike Hearn
bd986f35f1 Bloom filtering: check for malformed Merkle trees. Resolves issue 593. Thanks to Pieter Wiulle. 2014-11-24 13:59:42 +01:00
Mike Hearn
dfc9d3c924 Sha256Hash: remark that it takes ownership of the byte array. 2014-11-24 13:59:00 +01:00
Mike Hearn
9814a6caba Slightly different attempt to fix thread safety issue in PeerGroup to in #278 - make connectTo always locked. It used to be that we couldn't do this but there are no comments reminding me why not, and unit tests + wallettemplate seem happy with it being locked, so I think changes in the network code since then have probably removed this issue. 2014-11-24 13:33:21 +01:00
Mike Hearn
69de1f01ac ECKey/DeterministicKey: replace ECPoint with a LazyECPoint wrapper that doesn't delays parsing of key bytes into a key structure until it's needed. The process of decoding keys from the wallet previously involved decompressing/recompressing them which was taking ~seconds for hundreds of keys on Dalvik/2012 era Androids. After this patch loading such a wallet takes a few hundred milliseconds, most of which is spent inside RIPEMD160. 2014-11-24 13:16:15 +01:00
Mike Hearn
34017e16f8 TestWithPeerGroup: don't stopAsync if the peergroup isn't running and update the class description. 2014-11-24 13:04:59 +01:00
Mike Hearn
5a8ed59029 PeerGroup: Reimplement pinging to use the executor. New code is simpler and more correct. 2014-11-24 13:04:59 +01:00
Mike Hearn
e7c00df740 Replace peerGroup.startAsync/awaitRunning with start() and awaitTerminated with stop(). 2014-11-24 13:04:58 +01:00
Mike Hearn
10340b13a6 Don't hold the peergroup lock whilst calculating bloom filters, and run on the executor thread. Move responsibility for deduplication into recalculateFastCatchupAndFilter(). 2014-11-24 13:04:58 +01:00
Mike Hearn
27bc229fab Rewrite how peer group manages connections and its internal thread:
- No longer uses Guava services, the change is source compatible but the two-step API is no longer needed

- Now has a dedicated ScheduledExecutorService as its core service thread, so we can schedule jobs for the future instead of using sleeps.

- Connection code was rewritten to be easier to follow (at least I think so).

The goal here is to generalise the peer group thread so it can do more things.
2014-11-24 13:04:58 +01:00
Mike Hearn
573b487c2b WAK: add note in javadoc about missing feature. 2014-11-24 13:04:42 +01:00
Mike Hearn
0952cf3d20 RefreshWallet doesn't need to specify localhost explicitly anymore. 2014-11-23 14:23:35 +01:00
Andreas Schildbach
e12930c00f Fix formatting dates at several places. Common mistakes:
- DateFormats are not thread safe
- new Date() is used for formatting which does not specify a locale

We now use a Utils.dateTimeFormat() helper for formatting to ISO 8601 (UTC).
2014-11-19 16:50:00 +01:00
Oscar Guindzberg
28d0743dd6 Update Script.getPubKeyHash() javadoc 2014-11-17 17:03:38 -03:00
Mike Hearn
5c908a86f1 Fix Orchid hash again 2014-11-17 17:23:15 +01:00
Mike Hearn
a2e9806f2f Update Orchid version and POM to reflect the dirauth change. 2014-11-17 14:05:20 +01:00
Andreas Schildbach
12750b5840 Fix another Java 6 compat issue. 2014-11-14 23:47:22 +01:00
Andreas Schildbach
cdc1a4ce99 Fix just asking Wallet.doMaintenance() for if maintenance needs to be done wastes addresses. 2014-11-14 23:25:58 +01:00
Mike Hearn
533489ed78 Java 6 compat to unbreak the build 2014-11-14 18:32:51 +01:00
Matt Corallo
ef0ae01b75 Some block-tester refactors, and a new large-reorg test (1008 blks) 2014-11-14 17:57:58 +01:00
Matt Corallo
d78e9b053a Exit after fail + 5 rules 2014-11-14 17:57:57 +01:00
Matt Corallo
d37bba6393 Partially revert feba3, remove non-deterministic sigs, timeout 2014-11-14 17:57:57 +01:00
Matt Corallo
3398216449 Fix potential headers-first NPE race 2014-11-14 17:57:57 +01:00
Matt Corallo
b0b8eb28d3 Why, oh why have I not rewritten this damn thing yet? 2014-11-14 17:57:57 +01:00
Matt Corallo
adf4a61836 Add test for the other half of b56 2014-11-14 17:57:57 +01:00
Matt Corallo
fed5891ef8 Remove UTXO rules which test non-existant protocol rules 2014-11-14 17:57:57 +01:00
Matt Corallo
ce41c10a9e Fix missing spendable coinbase 2014-11-14 17:57:57 +01:00
Matt Corallo
c824bd4491 Missed b89 and some spendableOutputs 2014-11-14 17:57:57 +01:00
Matt Corallo
718c0b61c2 Add OP_RETURN tests to expose bug on master (thanks gmaxwell)
(and fix rebase issues)
2014-11-14 17:57:57 +01:00
Matt Corallo
1740ec6750 Fix OOM issues introduced by recent changes. 2014-11-14 17:57:57 +01:00
Matt Corallo
2780b3f9b7 Fix height in large-reorg test 2014-11-14 17:57:57 +01:00
Matt Corallo
8284e1cfbc Fix b49 duplicate hash error 2014-11-14 17:57:57 +01:00
Dave Collins
0eb4b23031 Add test for invalid opcode in dead execution path.
Bitcoind only errors when an invalid opcode in a transaction script is
actually executed.  This commit adds a test case to ensure this
behavior is the same between different implementations.

Conflicts:
	core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java
2014-11-14 17:57:57 +01:00
Dave Collins
18f03c15d6 Correct spend output comments for b77-b82. 2014-11-14 17:57:57 +01:00
Matt Corallo
ac65d91eec Fix block tester and (possibly) make it work with headers-first 2014-11-14 17:57:57 +01:00
Matt Corallo
05a67aef92 Keep track of hash->block mappings
Conflicts:
	core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java
2014-11-14 17:57:57 +01:00
Matt Corallo
4247bc75f6 Help BitcoindComparisonTool work with getheaders requirements 2014-11-14 17:57:57 +01:00
Mike Hearn
ccbd30da8f Delete !notfound code paths. 2014-11-14 17:33:01 +01:00
Andreas Schildbach
f410201342 Fix missing WalletExtensionsTest.tearDown(). This caused a corrupt Wallet.SendRequest.DEFAULT_FEE_PER_KB. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
ae48f18641 Set up encrypted wallet only in tests that need it. Should speed up unit tests a bit. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
91f3d23165 Tests for completing transactions with non-standard fees. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
b7166d650d Print fee with Transaction.toString(), if known. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
40b46f0326 Remove IOException from TestWithWallet. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
53688cde60 Replace duplicated "current wallet version" constant by code that looks it up from the .proto itself. 2014-11-14 17:08:51 +01:00
Mike Hearn
20955814bb Same change for Fiat.parseCoin 2014-11-14 16:52:09 +01:00
Giannis Dzegoutanis
683c50b3fa made Coin.parseCoin method to throw an IllegalArgumentException instead of an ArithmeticException in cases of fractional satoshis 2014-11-14 16:46:21 +01:00
Adam Mackler
e2b00e4cda Clarify javadoc comments regarding whether HD derivations are hardened. 2014-11-14 16:43:20 +01:00
Mike Hearn
17fae952a7 Move NetworkParameters to first argument in DeterministicKey serialize/deserialize methods, it's more conventional that way. 2014-11-14 16:42:14 +01:00
Wojciech Langiewicz
41f8f5ccb4 Addes NetworkParams as a parameter to DeterministicKey serialization/deserialization. 2014-11-14 16:34:19 +01:00