3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-30 23:02:15 +00:00
Commit Graph

786 Commits

Author SHA1 Message Date
Mike Hearn
dece35e95c Fix typo in name of FilteredBlockAndPartialMerkleTreeTests 2013-01-28 16:32:32 +01:00
Mike Hearn
35d6084bbf Refactor some of the wallet/peer interaction. Analyze dependencies of relevant pending transactions.
The Peer object now asks each connected Wallet if it cares about a transaction. If it does, then receivePending() is not called immediately, but rather after downloading of dependencies and with those dependencies. If any dependencies are time locked, a new wallet property controls whether they are discarded or not.
2013-01-28 16:32:31 +01:00
Mike Hearn
bfcf67ee5a Allow NotFoundMessage to be constructed with a list of InventoryItems. 2013-01-28 16:32:31 +01:00
Mike Hearn
8b9ddd2caf Link Peer and Wallet directly instead of using an event listener.
This paves the way for tighter coupling in future, needed for various features.
2013-01-28 16:32:31 +01:00
Mike Hearn
e9babb2772 Use ping messages to work around the lack of notfound messages on old nodes.
For now optimistically assume Gavin merges the notfound patch into bitcoin-qt, version wise.
2013-01-28 16:32:31 +01:00
Mike Hearn
b7b52c3fc9 Add support for recursively downloading mempool dependencies of a given mempool transaction.
This isn't currently used anywhere, but can be used as the first step of doing some basic risk analysis of unconfirmed transactions.
2013-01-28 16:32:31 +01:00
Mike Hearn
43e1d084cb Add Matts copyright notice to TestWithPeerGroup 2013-01-28 16:20:43 +01:00
Matt Corallo
cea95b809d Refresh filter every 25000 blocks to avoid a ballooning fp rate. 2013-01-27 03:41:11 -05:00
Matt Corallo
5f070e9861 Improve privacy: use const tweak + try for const filter parameters 2013-01-27 03:41:11 -05:00
Matt Corallo
1ea4cb457d Add the new nFlags BloomFilter fields to control auto-updating. 2013-01-27 03:41:10 -05:00
Matt Corallo
3906aa62d9 Add test cases for PMT/FilteredBlock including network download. 2013-01-27 03:40:31 -05:00
Matt Corallo
9577bd644e Ask peers for filtered blocks when appropriate and handle them. 2013-01-27 03:40:31 -05:00
Matt Corallo
db8afbdadf Add an AbstractBlockChain.add(FilteredBlock...) 2013-01-27 03:40:31 -05:00
Matt Corallo
289c3d19f0 Add a Wallet.notifyTransactionIsInBlock(Sha256Hash txHash...) 2013-01-27 03:40:31 -05:00
Matt Corallo
661ad3cb04 Add PartialMerkleTree and FilteredBlock classes 2013-01-27 03:40:31 -05:00
Matt Corallo
a5f9c3381b Add relayTxesBeforeFilter flag to VersionMessage, PROTOCOL_VERSION
This adds a relayTxesBeforeFilter flag to VersionMessage, bringing
it in line with PROTOCOL_VERSION 70001, and bumps the
PROTOCOL_VERSION accordingly.
2013-01-27 03:40:31 -05:00
Matt Corallo
a0c25aed28 Make bloom filter false positive rate configurable. 2013-01-27 03:40:31 -05:00
Matt Corallo
7c03eefefd Send peers a bloom filter from our wallet(s). 2013-01-27 03:40:31 -05:00
Matt Corallo
394d0b788d Add Wallet.getBloomFilter and a test-case for it. 2013-01-27 03:40:30 -05:00
Matt Corallo
e263229b62 Add BloomFilter class/messages and a test-case. 2013-01-27 02:32:36 -05:00
Matt Corallo
c751e1f179 Add Utils.checkBitLE/setBitLE to interact with bit sets. 2013-01-27 02:32:36 -05:00
Matt Corallo
3805e8956b Remove useless conditional (old version of 95b5e0d894 was merged) 2013-01-27 02:32:36 -05:00
Matt Corallo
38d01e14a6 Fix #292 by &'ing sigHashType to treat it as unsigned. 2013-01-27 02:32:36 -05:00
Mike Hearn
3211fe59f3 Fix s/connectionTimeoutMillis/connectTimeoutMillis/ in a javadoc. Resolves issue 284. 2013-01-23 17:22:09 +01:00
Mike Hearn
40c13eb3f3 Fix send futures in FakeChannelSink to unbreak a unit test that deadlocks after a previous change. 2013-01-23 17:17:00 +01:00
Mike Hearn
d919ede7a8 Specify time zone in block chain unit test. Resolves issue 291. 2013-01-23 17:12:53 +01:00
Mike Hearn
19b032e2e4 Simplify TCPNetworkConnection a bit and print the version message data when the peer sends it to us, not when we get a VerAck back from our own version announcement. 2013-01-20 23:47:56 +01:00
Mike Hearn
caa92985e1 When broadcasting a spend, wait for the tx message to actually hit the wire before proceeding.
This resolves an issue where wallet-tool would shut down before the message was actually sent.
2013-01-20 23:47:32 +01:00
Mike Hearn
6504296b79 Avoid confusing bugs by switching NetworkParameters.testNet() to be testnet3 not testnet2. 2013-01-16 18:15:46 +01:00
Mike Hearn
707e3a0989 Simplify FetchBlock by updating it to the latest APIs. 2013-01-16 17:55:46 +01:00
Mike Hearn
22f8034de8 Minor JavaDoc updates. 2013-01-16 17:55:46 +01:00
Mike Hearn
75e467dfc4 Make TestUtils.roundTripTransaction public. 2013-01-16 17:55:36 +01:00
Mike Hearn
ee715a5f59 Add some convenience getters to a couple of classes. 2013-01-16 17:55:36 +01:00
Mike Hearn
9382ee15e9 POM indentation fix. 2013-01-16 14:23:17 +01:00
Mike Hearn
a39dfddead Silence a newly noisy MemoryPool debug log, as we now expect to receive un-announced transactions in several cases (dep download, Bloom filtering) 2013-01-16 13:20:55 +01:00
Mike Hearn
8923af5785 Fix typo that prevented connection timeouts from being set properly. 2013-01-15 14:17:15 +01:00
Mike Hearn
4254e276fb Clean up Peer.java a bit - remove the custom future implementation and use Guava futures instead. 2013-01-14 22:30:32 +01:00
Mike Hearn
e4e4e45a47 Allow re-signing of transactions and re-sign after adjusting the sequence number. 2013-01-12 14:47:43 +01:00
Mike Hearn
916e33254f Resolve some race conditions.
It was possible that during saving of a wallet a network thread would update the confidence metrics due to broadcast announcements. This change makes TransactionConfidence use a COW list so the broadcast peer set can be iterated over safely. Resolves issue 277.
2013-01-12 14:27:49 +01:00
Mike Hearn
9a65d4cab8 Move ping timer cancellation to after channel close during PeerGroup shutdown.
Check if the service is running before trying to re-ping a peer.
Attempts to solve a shutdown race. Updates issue 275.
2013-01-12 14:27:49 +01:00
Mike Hearn
89c611d86b Always use getLockTime in isFinal. 2013-01-12 14:27:49 +01:00
Mike Hearn
a6f1233b4e Delete some 0.5 -> 0.6 migration code from WalletTool. 2013-01-12 14:27:49 +01:00
Mike Hearn
b5b43f3a15 Better support for lock timed transactions.
Lock times are now included in various toString dumps.
Transactions can estimate their lock time when the time is specified as a block number.
Add support to WalletTool for creating timelocked transactions.
2013-01-12 14:26:59 +01:00
Mike Hearn
48cdc1d9e7 improve findbugs exclusions 2013-01-12 14:26:59 +01:00
Mike Hearn
f2db0028ca Slightly improve wallet-tool help text. Updates issue 273. 2013-01-12 14:26:59 +01:00
Mike Hearn
9da08d2036 Try all returned IP addresses in IRC discovery and use the given timeout.
Resolves issue 268. Resolves issue 269.
2013-01-12 14:26:59 +01:00
Mike Hearn
1454261ff3 Use the testnet3 channel in PrintPeers. 2013-01-11 22:14:12 +01:00
Mike Hearn
682033aef6 Actually use the provided IRC server name in IrcDiscovery. Resolves issue 266. 2013-01-11 21:58:45 +01:00
Mike Hearn
93870110c3 Use blocking PeerGroup startup in WalletTool 2013-01-10 14:12:58 +01:00
Mike Hearn
43e8752ef8 Make PeerGroup.addAddress adjust the number of requested connections. 2013-01-10 14:12:50 +01:00