3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-22 23:25:48 +00:00

626 Commits

Author SHA1 Message Date
Mike Hearn
1efa1442c8 (API CHANGE) Pass the FilteredBlock into PeerEventListener.onBlocksDownloaded when present.
Keep track of downloaded vs server-side filtered transactions per second.
Add a keyboard shortcut to wallet-template to force disconnection from the current peer.
2015-02-17 17:02:57 +01:00
Mike Hearn
b2c1aba4d6 PeerGroup: sync improvements round two. Move chain download speed monitoring out of AbstractBlockChain and fix it so it doesn't sometimes print garbage. Add a stall detector. Next step is to force switch download peers when there's a long enough stall. 2015-02-16 18:11:46 +01:00
Sean Gilligan
c72c48cd58 Add Comparable to VersionedChecksummedBytes
* Add Comparable interface to VersionedChecksummedBytes
* Add compareTo() method to VersionedChecksummedBytes
* Add test for VersionedChecksummedBytes
* Add tests for Address
2015-02-03 00:15:25 +01:00
Mike Hearn
bc60f0d1f2 TransactionBroadcast: only consider a tx rejected if it has more than half peers signalling a reject. 2015-01-29 19:24:02 +01:00
Mike Hearn
fd10654143 Fix wallet tests that were using 1 as a private key. 2015-01-28 18:34:27 +01:00
Sean Gilligan
3456e896ec Make Address (& super & subs) Cloneable
* Implement Cloneable in VersionedChecksummedBytes
* Override clone() in VersionedChecksummedBytes
* Override clone() in Address
* Add Unit test file for VersionedChecksummedBytes
* Add clone unit tests for clone for all subclasses
   of VersionedChecksummedBytes

TODO: Consider overriding clone() in DumpedPrivateKey and
      BIP38PrivateKey
2015-01-16 19:54:22 +01:00
Oscar Guindzberg
336b0f6aa2 Fix typo 2015-01-16 11:32:05 -03:00
Mike Hearn
11463e729f Add a feature to PeerGroup that lets you find/wait for peers that match a certain mask, similar to those methods that exist for peer versions. 2015-01-09 15:17:56 +01:00
Andreas Schildbach
2fa5ba30e2 DefaultRiskAnalysis.isStandard checks for signatures to use canonical DER encoding. Adds a test. 2015-01-02 21:00:11 +01:00
Andreas Schildbach
17071ce15c Extract ECDSASignature.isCanonical() which checks for BIP62 low S value. Adds a test. 2015-01-02 17:29:17 +01:00
Andreas Schildbach
89c53a8f8e Add Wallet.fromKeys(). Creates a wallet containing a given set of keys. All further keys will be derived from the oldest key. 2014-12-18 13:32:24 +01:00
Mike Hearn
9025a65334 Block tester: Bring back UTXO rules when the local node supports them 2014-12-17 01:23:46 +01:00
Wojciech Langiewicz
bc24661254 Fix for issue 539, adds atomic operation for changing wallet encryption key/password. 2014-12-13 14:49:37 +01:00
Andreas Schildbach
4e313661df Add isPubKeyOnly and isEncrypted to both ECKey.toString() and DeterministicKey.toString(). 2014-12-11 23:09:10 +01:00
Andreas Schildbach
b2526f0b4d Throw when trying to set creation time of a DeterministicKey that is a leaf in the hierarchy. It would be needlessly stored, but unreadable. 2014-12-11 23:08:24 +01:00
Mike Hearn
b3c761388f Fix build, somehow this didn't show up before. 2014-12-08 22:13:40 +01:00
Mike Hearn
40c4338aaa Some fixes for crashes that could occur with a chain-less PeerGroup post-TxConfidenceTable changes. 2014-12-08 22:10:48 +01:00
Mike Hearn
757e25ba9b Wallet: fix a bug that could cause a temporarily corrupted balance, when two pending transactions arrive backwards 2014-12-04 17:09:53 +01:00
Devrandom
1ba568e069 rename TxConfidencePool to TxConfidenceTable 2014-12-03 13:10:07 +01:00
Devrandom
bc3a5cd845 introduce a Context object vended by AbstractBlockChain
have it hold the confidencePool
2014-12-03 13:10:06 +01:00
Devrandom
beb6f0873f Mark unrelated flaky test 2014-12-03 13:10:06 +01:00
Devrandom
b9bca58f26 Remove tx from TransactionConfidence 2014-12-03 13:10:06 +01:00
Devrandom
ec7cec67a7 Rename MemoryPool to TxConfidencePool and make singleton 2014-12-03 13:04:10 +01:00
Kalpesh Parmar
96a82800fd 1) Update the full stores to return UTXO transactions.
2) The wallet can now use a UTXOProvider to create spends.
3) Updated MySQL field blob size.  It's capacity isn't sufficient.
4) Updated internal objects to be able to cope with a null parent tx (spend free standing outputs).
2014-12-03 12:56:07 +01:00
Bennett Hoffman
552bf3fa4d Use ArrayList instead of HashSet in DefaultCoinSelector#select. Test 2014-12-03 12:39:58 +01:00
Jarl Fransson
df00b1e27e PaymentChannelClient support encrypted wallets. Store will upgrade forward gracefully. 2014-12-02 16:28:14 +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
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
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
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
Andreas Schildbach
12750b5840 Fix another Java 6 compat issue. 2014-11-14 23:47:22 +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