Mike Hearn
59c1f23931
Adjust getutxo min protocol version.
2015-01-08 18:35:19 +01:00
Mike Hearn
57bbb9152b
Give regtest a payment protocol ID too.
2015-01-08 18:35:11 +01:00
Mike Hearn
e09e383007
Give unit test params a payment protocol ID.
2015-01-07 17:23:02 +01:00
Mike Hearn
0b5b101343
Abstract out multiplexing from DnsDiscovery.
2015-01-07 16:43:57 +01:00
langerhans
b3b8c0eb8d
Merge remote-tracking branch 'upstream/master' into rebase
2015-01-06 20:52:03 +01:00
Andreas Schildbach
f36576ce29
WalletAppKit to use new Wallet.reset().
2015-01-06 15:02:11 +01:00
langerhans
e6fc3deb50
Merge remote-tracking branch 'upstream/master' into rebase
...
Conflicts:
core/src/main/java/com/dogecoin/dogecoinj/wallet/DefaultRiskAnalysis.java
core/src/test/java/com/dogecoin/dogecoinj/core/ECKeyTest.java
core/src/test/java/com/dogecoin/dogecoinj/wallet/DefaultRiskAnalysisTest.java
tools/src/main/java/com/dogecoin/dogecoinj/tools/WatchMempool.java
2015-01-04 20:33:24 +01:00
langerhans
f6d3c1b305
Fix the params
2015-01-04 19:09:19 +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
121d2fcb63
Change the WatchMempool pool to build statistics about risk analysis. Removes the pay-to-pubkey detection which was in there.
2015-01-02 17:30:24 +01:00
Andreas Schildbach
e8e13de4d4
Restrict access to ECKey.CURVE_PARAMS. The field is almost redundant. Parameters can be fetched from ECKey.CURVE as well.
2015-01-02 17:29:46 +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
18c63a703f
When connecting outputs to inputs, cache its value in the input. This will make sure the fee is also known after a blockchain replay.
2015-01-01 19:53:13 +01:00
Andreas Schildbach
4d3297d334
Add Wallet.reset() to prepare the wallet for a blockchain replay.
2015-01-01 19:50:55 +01:00
langerhans
ac12628289
Higher precision for Fiat values in DOGE land
2014-12-31 19:23:51 +01:00
langerhans
e00a5b2776
Comment out unittest params for now.
2014-12-30 19:19:28 +01:00
Adam Mackler
e77089f739
NPE when invoking PeerGroup.broadcastTransaction()
on peer group with no block chain.
...
The modified line here seems to have been assuming that `pinnedTx` was being
initialized elsewhere, but it wasn't.
2014-12-28 07:17:43 -05:00
Andreas Schildbach
1fae7cadc9
Add creationTimeSeconds to wallet dump.
2014-12-23 18:18:50 +01:00
langerhans
905629a78f
Merge branch 'master' of https://github.com/bitcoinj/bitcoinj into rebase
...
Conflicts:
README.md
core/pom.xml
core/src/main/java/com/dogecoin/dogecoinj/core/DownloadListener.java
core/src/main/java/com/dogecoin/dogecoinj/core/MemoryPool.java
core/src/main/java/com/dogecoin/dogecoinj/core/NetworkParameters.java
core/src/main/java/com/dogecoin/dogecoinj/core/PeerFilterProvider.java
core/src/main/java/com/dogecoin/dogecoinj/core/PeerGroup.java
core/src/main/java/com/dogecoin/dogecoinj/core/StoredTransactionOutput.java
core/src/main/java/com/dogecoin/dogecoinj/core/Wallet.java
core/src/main/java/com/dogecoin/dogecoinj/crypto/EncryptedPrivateKey.java
core/src/main/java/com/dogecoin/dogecoinj/crypto/KeyCrypterScrypt.java
core/src/main/java/com/dogecoin/dogecoinj/jni/NativeTransactionConfidenceListener.java
core/src/main/java/com/dogecoin/dogecoinj/kits/WalletAppKit.java
core/src/main/java/com/dogecoin/dogecoinj/net/FilterMerger.java
core/src/main/java/com/dogecoin/dogecoinj/protocols/channels/IPaymentChannelClient.java
core/src/main/java/com/dogecoin/dogecoinj/protocols/channels/PaymentChannelClient.java
core/src/main/java/com/dogecoin/dogecoinj/protocols/channels/PaymentChannelClientConnection.java
core/src/main/java/com/dogecoin/dogecoinj/protocols/channels/PaymentChannelClientState.java
core/src/main/java/com/dogecoin/dogecoinj/store/BlockStore.java
core/src/main/java/com/dogecoin/dogecoinj/store/FullPrunedBlockStore.java
core/src/main/java/com/dogecoin/dogecoinj/store/H2FullPrunedBlockStore.java
core/src/main/java/com/dogecoin/dogecoinj/store/PostgresFullPrunedBlockStore.java
core/src/main/java/com/dogecoin/dogecoinj/testing/FakeTxBuilder.java
core/src/main/java/com/dogecoin/dogecoinj/testing/TestWithPeerGroup.java
core/src/main/java/com/dogecoin/dogecoinj/wallet/KeyChainGroup.java
core/src/main/java/org/bitcoinj/core/DownloadListener.java
core/src/main/java/org/bitcoinj/core/DownloadProgressTracker.java
core/src/main/java/org/bitcoinj/core/MemoryPool.java
core/src/main/java/org/bitcoinj/core/StoredTransactionOutput.java
core/src/main/java/org/bitcoinj/core/TxConfidenceTable.java
core/src/main/java/org/bitcoinj/core/UTXO.java
core/src/main/java/org/bitcoinj/params/MainNetParams.java
core/src/test/java/com/dogecoin/dogecoinj/core/AbstractFullPrunedBlockChainTest.java
core/src/test/java/com/dogecoin/dogecoinj/core/BitcoindComparisonTool.java
core/src/test/java/com/dogecoin/dogecoinj/core/FilteredBlockAndPartialMerkleTreeTests.java
core/src/test/java/com/dogecoin/dogecoinj/core/FullBlockTestGenerator.java
core/src/test/java/com/dogecoin/dogecoinj/core/PostgresFullPrunedBlockChainTest.java
core/src/test/java/com/dogecoin/dogecoinj/core/WalletTest.java
core/src/test/java/com/dogecoin/dogecoinj/crypto/ChildKeyDerivationTest.java
core/src/test/java/com/dogecoin/dogecoinj/store/WalletProtobufSerializerTest.java
core/src/test/java/com/dogecoin/dogecoinj/wallet/DefaultRiskAnalysisTest.java
core/src/test/java/com/dogecoin/dogecoinj/wallet/DeterministicKeyChainTest.java
tools/src/main/java/com/dogecoin/dogecoinj/tools/WalletTool.java
wallettemplate/pom.xml
wallettemplate/src/main/java/wallettemplate/Main.java
wallettemplate/src/main/java/wallettemplate/MainController.java
wallettemplate/src/main/java/wallettemplate/SendMoneyController.java
2014-12-23 18:09:55 +01:00
Mike Hearn
f82f160c2c
PeerGroup: configure peer as download peer even when there is no chain, but don't configure download params as that would trigger block fetch.
2014-12-21 14:03:13 +01:00
Mike Hearn
2b6db0dc80
Add an experimental HTTP based peer discovery engine that uses signed gzipped protocol buffers.
2014-12-19 02:30:58 +01:00
Mike Hearn
483f9b50e6
WalletAppKit: allow customisation of the peer discovery engine.
2014-12-19 02:29:44 +01:00
Mike Hearn
211966b17b
ECKey: add throwing variants of the verify methods. Can help avoid mistakes when ignoring the result of verify.
2014-12-19 02:29:23 +01:00
Mike Hearn
b00930efcd
ECKey: clarify name of parameter
2014-12-19 01:53:16 +01:00
Mike Hearn
92e28bb516
Quieter logging in ConnectionHandler
2014-12-18 14:17:04 +01:00
Mike Hearn
4a4691596b
NioClientManager: change logging levels
2014-12-18 14:01:47 +01:00
Mike Hearn
2967e07c8b
Change how DownloadProgressTracker waits for progress to avoid possible deadlocks.
2014-12-18 13:59:50 +01:00
Mike Hearn
b25899de58
Rename DownloadListener to DownloadProgressTracker
2014-12-18 13:59:50 +01:00
Andreas Schildbach
36850b1d0e
Add warning about randomly generated keys to Wallet constructor.
2014-12-18 13:32:24 +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
ae585608e6
ClientConnectionManager.openConnection now returns a future. Some logging about connection failures was removed.
2014-12-18 02:23:21 +01:00
Mike Hearn
200dc1294c
Peer: Fix some more crashes that can occur when operating without a blockchain object
2014-12-17 19:23:13 +01:00
Mike Hearn
c18423fde3
Peer: utility for requesting addr data
2014-12-17 18:58:32 +01:00
Mike Hearn
54edb541a2
Peer: Add a convenience accessor
2014-12-17 18:58:16 +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
Mike Hearn
aed7c438ea
DatabaseFullPrunedBlockStore: more detailed error message
2014-12-17 01:23:46 +01:00
Mike Hearn
bbd82746ee
FullPrunedBlockChain: don't log if script is unparseable and simplify getScript function.
2014-12-17 01:23:46 +01:00
Mike Hearn
7b83e330df
Regen proto files
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
Andreas Schildbach
eb24bafdbc
Guard BasicKeyChain.importKey*() against accidently importing the same key twice, potentially losing a private key.
2014-12-11 22:55:22 +01:00
Andreas Schildbach
e5bc481743
Make curve and bits in LazyECPoint final.
2014-12-11 22:53:53 +01:00
Andreas Schildbach
4499e0f7c1
Add some logging to LinuxSecureRandom.
2014-12-11 12:14:39 +01:00
Andreas Schildbach
5aaf6a25db
When running on Android, automatically insert LinuxSecureRandom provider.
2014-12-11 12:14:39 +01:00
Andreas Schildbach
525ad3504d
Move LinuxSecureRandom from Bitcoin Wallet to bitcoinj. This class is in use since August 2013 without any signs of RNG issues.
2014-12-11 12:14:39 +01:00
Mike Hearn
ef6240a8f8
Transaction.toString(): Don't try printing hash160 for non-address type outputs
2014-12-09 14:23:58 +01:00
Mike Hearn
ab0b6d75fa
Script: fix javadoc
2014-12-09 14:23:58 +01:00
Andreas Schildbach
46ed65935c
Add Wallet.getIssuedReceiveKeys() and Wallet.getIssuedReceiveAddresses() so that derived addresses can be shown in an UI.
2014-12-09 12:11:59 +01:00
Mike Hearn
b3c761388f
Fix build, somehow this didn't show up before.
2014-12-08 22:13:40 +01:00
Mike Hearn
fef4829a3d
PeerGroup: log exceptions in executor jobs, as the executor doesn't do this itself (gah)
2014-12-08 22:10:48 +01:00
Mike Hearn
0a34914d16
TransactionBroadcast: Member variable to local
2014-12-08 22:10:48 +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
Andreas Schildbach
7625fccd22
Move comment about Java 6 compilation to the appropriate places.
2014-12-06 16:03:32 +01:00
Mike Hearn
d438caaece
Widen arg types for Transaction.getInput and getOutput so they can be fed the result of TransactionOutPoint.getIndex() directly.
2014-12-04 17:50:37 +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
Mike Hearn
fccb6f03bd
WalletAppKit: allow restore from wallet seed even when there are no checkpoints i.e. regtest mode
2014-12-04 15:57:34 +01:00
Mike Hearn
625d19230d
PeerGroup: don't keep trying every second when discovery returns zero peers but we have enough connections anyway.
2014-12-04 15:20:28 +01:00
Mike Hearn
7d7f826367
Fix lock inversion tags<->wallet lock.
2014-12-04 11:28:26 +01:00
Devrandom
1ba568e069
rename TxConfidencePool to TxConfidenceTable
2014-12-03 13:10:07 +01:00
Devrandom
2dfeee55b6
Clean up JavaDoc for deprecated PeerGroup.getConfidencePool
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
Carlos Lopez
a2ac847ee9
Wallet.loadFromFile takes WalletExtensions
2014-12-03 13:00:57 +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
Andreas Schildbach
ad87ee9a3c
Consistently use version 2.9.1 of maven-javadoc-plugin.
2014-11-24 15:01:10 +01:00
Andreas Schildbach
77dd531be4
Fix potential race condition when checking keychain for key rotation time.
2014-11-24 15:00:01 +01:00
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
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