3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 10:45:51 +00:00

1780 Commits

Author SHA1 Message Date
Andreas Schildbach
3d5c25e3c4 Fix missing checksums for the OkHttp dependencies. 2015-05-04 12:24:26 +02:00
Mike Hearn
06ba160361 Tor: accelerate startup by using HTTP/Cartographer seeding when possible instead of DNS.
We still use TorDiscovery for networks where we don't have any Cartographer seeds. Switch to OkHTTP because the standard Java HTTP client doesn't let you customise the socket factory and thus cannot be used via Tor directly (doh).
2015-04-28 22:56:23 +02:00
Mike Hearn
b82d6e05ed Tor: don't add DNS discovery in WalletAppKit when Tor is active 2015-04-28 22:54:05 +02:00
Mike Hearn
8742b87701 BlockingClient: shorter error log 2015-04-28 22:53:34 +02:00
Mike Hearn
535c2852ea TransactionBroadcast: invoke the progress listener if the broadcast already started, to avoid people accidentally writing races when using the PeerGroup convenience APIs. 2015-04-23 14:57:38 +02:00
Mike Hearn
5181cefcf2 Wallet: fix thread safety bug where keychain lock was not being acquired in toString 2015-04-22 15:28:18 +02:00
Mike Hearn
acfc046a08 Wallet extensions: log errors when deserializing a non-mandatory extension and remove it from the wallet if deserialization throws. 2015-04-22 14:53:10 +02:00
Mike Hearn
a0fe912ff0 PeerGroup: delete dead code 2015-04-21 18:04:21 +02:00
Mike Hearn
b749779c89 PeerGroup: catch all throwables inside the speed calculator, not just exceptions 2015-04-21 18:04:11 +02:00
Mike Hearn
a188525981 Wallet: put getWatchedBalance() and getWatchedBalance(CoinSelector) back as deprecated aliases, this is now the default behaviour. 2015-04-21 15:15:58 +02:00
Mike Hearn
70b78363ea Wallet.addWatchedScripts() now lets you update a script in the wallet with a new creation time. Add some discussion to the Javadoc about this issue. 2015-04-21 14:56:18 +02:00
Mike Hearn
4471709693 Watch out for scripts with a creation time of zero (and warn the developer about them via logging). 2015-04-21 14:48:46 +02:00
Mike Hearn
eb15ded065 PeerGroup: use a default FP rate that's much lower than the current rate, to boost performance. As there are various well documented de-anonymization attacks on Bloom filtering in bitcoinj (and BreadWallet) wasting bandwidth without getting additional privacy benefit doesn't help us much, so may as well take the performance until one day the code is smart enough to lie convincingly. 2015-04-21 13:52:53 +02:00
Mike Hearn
dd453ca677 PeerGroup: stall handling tweak: specify default bandwidth requirement in terms of block headers per second and make much lower, to avoid having false stalls when the Bloom FP rate is lowered (and thus bandwidth required is much lower). It's unclear how useful stall handling will be after this change, but we'll experiment with it a bit and find out. 2015-04-21 13:50:32 +02:00
Mike Hearn
82a0ddd4de Wallet: Provide new balance types to calculate balances excluding watching outputs. This is useful for wallets where transactions have been manually added and thus there is a mix of watching and non-watching transactions. The "new in 0.13" behaviour that getBalance(AVAILABLE) includes unspendable outputs is preserved, so the more typical approach of having a watching wallet and calling getBalance() still does what you expect and reports the balance of the watched wallet.
API change: send completion would previously include watched outputs and could therefore throw MissingPrivateKeyException. This has now changed so watched outputs won't be considered and thus the exception may change to be InsufficientMoneyException, unless completing a pre-prepared transaction that is already connected to watched outputs.
2015-04-21 13:01:29 +02:00
Mike Hearn
ef9e49d5e7 DeterministicKey: override hasPrivKey and getSecretBytes to reflect the private key derivation strategy used. 2015-04-21 13:01:29 +02:00
Mike Hearn
9faa4a686b DK.isWatching simplification 2015-04-21 13:01:29 +02:00
Mike Hearn
54a6316243 Make BasicKeyChain.isWatching return a state enum instead and use it to simplify KeyChainGroup.isWatching() 2015-04-21 13:01:29 +02:00
Andreas Schildbach
ed6821ed15 Add Wallet.isWatching() to determine if the wallet is a watching wallet. Comes with tests. 2015-04-21 13:01:29 +02:00
Mike Hearn
1e6ce4b1ba Rename DeterministicKey.getPubOnly() to dropPrivateBytes() to reflect what it's actually trying to do, and add dropParent() as well for the cases where we actually need a truly privkey-lacking object. Update the call sites to do whatever is appropriate for those situations. 2015-04-21 13:01:28 +02:00
Andreas Schildbach
a1612b0a8f Implement DeterministicKey.isPubKeyOnly(). The super-implementation in ECKey doesn't take possible rederivation into account. 2015-04-21 13:01:28 +02:00
Mike Hearn
e9bffdda18 DefaultCoinSelector: no-op code simplification 2015-04-21 13:01:28 +02:00
Andreas Schildbach
f2eaf4a562 Update to jackson 2.5.x. 2015-04-17 16:37:13 +02:00
Andreas Schildbach
dba18dfb4d Update to slf4j 1.7.7. 2015-04-17 16:37:13 +02:00
Andreas Schildbach
f2e3111ba8 Update to junit 4.12. 2015-04-17 16:37:13 +02:00
Andreas Schildbach
2e3ee3b161 Update to easymock 3.2. 2015-04-17 16:37:13 +02:00
Andreas Schildbach
ee6fb7c65e Add missing checksum for the new leveldb dependency. 2015-04-11 11:30:07 +02:00
Mike Hearn
7d7ba9c8ef Some fixes for LevelDB SPV block store. 2015-04-09 16:57:28 +02:00
Mike Hearn
ec6f8a3c9d WalletAppKit: Allow overriding of the block store in use. 2015-04-08 18:30:34 +02:00
Mike Hearn
d46ba33343 Add a LevelDB/JNI based SPV block store that records all headers. 2015-04-08 18:30:21 +02:00
Mike Hearn
527274a40f Add FilteredBlock.getPartialMerkleTree() 2015-04-07 19:26:32 +02:00
Mike Hearn
c426e34646 Bug fix: don't pointlessly download a transaction we already have because we're broadcasting it.
This is a regression caused by the TxConfidenceTable rewrite: previously it pinned entire transactions and that was used to notice that a broadcast was happening. Now it only pins confidence objects. So instead we use the confidence.source property: if it's SELF then we assume we have it somewhere in the address space and don't bother downloading it when a peer announces it. If it's UNKNOWN then PeerGroup.broadcastTransaction will set it to SELF.
2015-04-07 15:37:22 +02:00
Mike Hearn
325e7e170b Transaction: print a log warning if lock time is set and a sequence number has not been. This is a common programming error. 2015-04-07 15:35:28 +02:00
Mike Hearn
1e7a13dd27 PeerGroup: better stall handling.
Calculate a moving average of the actual download speed and use it to decide when to disconnect. If the network is pathologically slow and we keep stalling, give up after the third time.
2015-04-06 19:01:19 +02:00
Mike Hearn
09744edfe3 Context: some small fixes + javadocs for WalletAppKit 2015-04-06 17:20:03 +02:00
Mike Hearn
b5994e3788 A bit of unit test cleanup. 2015-04-06 16:34:59 +02:00
Mike Hearn
7576a44ef4 getutxo: Bugfixes identified by static analysis 2015-04-06 15:32:02 +02:00
Mike Hearn
037ec5aef9 getutxo: Flesh out the JavaDocs, link to the BIP, include brief security discussion, and make Peer support multiple in flight queries at once. 2015-04-06 15:14:31 +02:00
Mike Hearn
4c12127501 Context: add c'tors that take a context to [Abstract/FullPruned/]BlockChain and PeerGroup. The existing c'tors now do a consistency check against the existing context or create a new one on the fly. 2015-04-05 19:52:58 +02:00
Mike Hearn
960e58343e Context: more TODOs 2015-04-03 19:42:36 +02:00
Oscar Guindzberg
64e09452f4 PeerSocketHandler: bugfix for incomplete message headers at the end of
the buffer
2015-03-27 16:44:00 -03:00
Oscar Guindzberg
e5b52fb73b PeerSocketHandler: make first message validation explicit 2015-03-27 16:43:44 -03:00
Andreas Schildbach
2837ad581a Make maven-javadoc-plugin print a lot less clutter. 2015-03-23 13:34:27 +01:00
Manfred Karrer
d13665c22f Add linebreak to comment 2015-03-23 11:15:19 +01:00
Manfred Karrer
b74d1e32a2 Add readObject method to initialise listeners object which would be null in case the confidence object gets created from Serialisation 2015-03-23 10:29:47 +01:00
Carlos Lopez-Camey
b28204b6ca Run core tests in alphabetical order 2015-03-22 10:42:37 -06:00
Carlos Lopez-Camey
4e6b544920 Create context for TestWithWallet 2015-03-22 17:07:53 +01:00
Carlos Lopez-Camey
48401a0af1 Removes deprecation warnings. In pom.xml artifactId is project.artifactId. Sha256Hash.createHash is Sha256Hash.hashTwice. LazyECPoint.getX and getY use getXCoord and getYCoord while forcing normalization. 2015-03-22 17:07:17 +01:00
Mike Hearn
275c9320ea More plugin updates and a regen of the dep verifier list. 2015-03-22 17:05:10 +01:00
Mike Hearn
c5123a320e Create context for WalletProtobufSerializerTest. 2015-03-22 16:48:57 +01:00