1246 Commits

Author SHA1 Message Date
Andreas Schildbach
2cfa39f2cf Version 0.10.2 v0.10.2 2013-10-20 17:22:39 +02:00
Mike Hearn
c808ae7bb4 FullBlockTestGenerator: treat coinbase scriptSig as a 16-bit counter not 8 bit.
This bug led to mysterious failures that only showed up when tests were run in a certain order and the counter happened to wrap around exactly.
2013-10-14 19:34:56 +02:00
Mike Hearn
ca2d847fe7 Don't run confidence listeners if we get duplicate invs from the same peer (can happen if we connect to the same peer IP multiple times). 2013-10-14 13:26:14 +02:00
Mike Hearn
e6ca742057 Wallet: track relative ordering of transactions within a block.
Ensures re-orgs don't replay transactions out of order. Resolves issue 468.
2013-10-14 11:22:32 +02:00
Mike Hearn
f867998c52 Refactor/bugfix broadcast of pending transactions when a peergroup starts up.
Previously the PeerGroup itself would broadcast the pending transactions by simply sending an inv with them all to every peer. This is a good way to get a transaction blasted out if there are no problems with it, but it means we cannot track propagation and the numBroadcastPeers() value was correspondingly not increased. This seems to be causing issues with the Android wallet. So try out a different approach - have the wallet use broadcastTransaction as per normal on the PeerGroup when it's added. The TX will be propagated and watched as with a normal spend.
2013-10-11 17:36:16 +02:00
Mike Hearn
db296193f9 WalletTool: fix typo 2013-10-11 17:35:55 +02:00
Mike Hearn
d6b4b55e83 Use earliest key time minus a week for setting fast catchup time and selecting a checkpoint.
This handles clock drift both in the block headers and possibly wrong times in the users clock (broken timezone, etc).

Resolves issue 460.
2013-10-08 12:32:34 +02:00
Mike Hearn
1d4ff1770e Threading: resolve a race in the unit tests: if the user thread wasn't initialised, don't crash trying to test if we're on it. 2013-10-08 12:32:34 +02:00
Mike Hearn
cb45e306df Script: clone tx before performing correctlySpends check. This prevents thread safety issues and corrupted transactions if validation fails. 2013-10-08 12:32:23 +02:00
Mike Hearn
4b5e8fcdb0 TransactionOutput: tighter checks on values when constructing (don't allow negative values, etc). 2013-10-08 12:05:45 +02:00
Mike Hearn
bce6968aec TransactionInput: better toString 2013-10-08 12:03:43 +02:00
Mike Hearn
511d6310d4 ECKey: don't crash when signing non-ASCII text 2013-10-03 00:02:23 +02:00
Mike Hearn
3f2c372097 Wallet: add a bit more logging to make output during chain splits less confusing. 2013-10-03 00:02:23 +02:00
Mike Hearn
01a55b557f Wallet: another re-org fix. 2013-10-03 00:02:23 +02:00
Mike Hearn
bdada0447f Wallet: use a single hashmap to track all transactions, then use it in receive to re-canonicalize the transactions.
Long story short, I'm a shitty programmer it seems. The Wallet will at some point be modified to track just bags of outputs derived from Transaction objects, and Transactions/Blocks will become immutable. At that point there won't be any confusion between mutable data associated with the deserialised objects.

Resolves issue 453.
2013-10-03 00:02:23 +02:00
Mike Hearn
0d9f8b7867 Make MemoryBlockStore store only a rolling window of the last 5000 blocks. Fixes BuildCheckpoints which was trying to store every block header and running out of heap space. 2013-10-03 00:02:23 +02:00
Mike Hearn
b883d88468 PeerGroup: correct logic for setting ver packet pre-filtering relay flag. 2013-10-03 00:02:23 +02:00
Mike Hearn
e89cc1a41d Make RegTestParams use testnet addresses, to follow sipa's upstream change. 2013-10-03 00:02:22 +02:00
Mike Hearn
0e809b2b31 Wallet: comment for AllowUnconfirmedCoinSelector.get() 2013-10-03 00:02:22 +02:00
Matt Corallo
a26b18c8fd Clarify PeerEventListener JavaDocs a bit 2013-10-02 23:46:58 +02:00
Andreas Schildbach
4d8e9088f2 Prepare 0.10.2-SNAPSHOT 2013-10-02 23:45:26 +02:00
Andreas Schildbach
1134572f61 Version 0.10.1 v0.10.1 2013-08-15 14:11:17 +02:00
Mike Hearn
d8f7eab42b Wallet: when "emptying" the wallet, only actually empty out the coins that would be considered selectable by the default coin selector.
By default that means unconfirmed coins won't be emptied, to avoid the empty tx becoming dependent on a tx that may never confirm.

 Resolves issue 438.
2013-08-15 13:54:26 +02:00
Andreas Schildbach
a3bbde87c6 Prepare 0.10.1-SNAPSHOT 2013-08-15 13:53:42 +02:00
Mike Hearn
777e6781d7 Version 0.10 v0.10 2013-08-11 16:54:32 +02:00
Mike Hearn
4abdf44449 Remove verifier from examples/pom.xml, it requires us to wait for reproducible build support to land. 2013-08-11 16:50:24 +02:00
Mike Hearn
a0edf70bc3 Move verifier XML around. 2013-08-11 16:50:24 +02:00
Mike Hearn
c261f75e8a Wallet: support for key rotation.
Key rotation allows you to specify a timestamp, and any money controlled by any keys created before that time will be automatically respent to keys created after it.
2013-08-11 16:50:24 +02:00
Mike Hearn
6680846949 PeerGroupTest: Fix a race. 2013-08-11 16:50:24 +02:00
Mike Hearn
1e227e521a Wallet: allow SendRequests to override the default coin selector. 2013-08-11 16:50:24 +02:00
Mike Hearn
1c8be1cc69 PeerGroup/Wallet: give the wallet a reference to a transaction broadcaster, so it can make its own transactions and broadcast them outside the context of a user initiated spend.
Later, we can change the mechanism used to broadcast pending transactions so the wallet does that itself.
2013-08-11 16:50:24 +02:00
Mike Hearn
91fa22181a Wallet: Minor nullity annotation and param genericity tweaks. 2013-08-11 16:50:24 +02:00
Matt Corallo
51186b8fc1 Fix manually-added transactions that make it into blocks. 2013-08-11 16:50:24 +02:00
Mike Hearn
bfcbe7f298 Add a remark to the BloomFilter javadocs about when you would want to use full-match filters. 2013-08-11 16:50:23 +02:00
Matt Corallo
2d1479eca9 Fix block tests 2013-08-11 16:50:23 +02:00
Matt Corallo
79f093f0c4 Implement mempool-test support in BitcoindComparisonTool 2013-08-11 16:50:23 +02:00
Matt Corallo
1fda444af7 InventoryItem.hashCode()
Conflicts:
	core/src/main/java/com/google/bitcoin/core/InventoryItem.java
2013-08-11 16:50:23 +02:00
Matt Corallo
75cbaed15c Make BloomFilter support match-all filters better 2013-08-11 16:50:23 +02:00
Mike Hearn
781b0dc958 Add distributionManagement section to the POM. 2013-07-30 14:47:08 +02:00
Matt Corallo
df47993e3d Add some comments for stateless protocols. 2013-07-30 14:47:08 +02:00
Mike Hearn
868493f2d1 Update README 2013-07-30 13:14:24 +02:00
Mike Hearn
32a1170e3a Add Gary Rowe's work on dependency verification to the POM.
Just a snapshot of current JARs is used for now. If our dependencies are already compromised we're out of luck, but this is unlikely.
2013-07-30 13:13:04 +02:00
Mike Hearn
8016ee8418 Wallet: explicitly note in the completeTx javadoc that it signs the added inputs. 2013-07-29 19:06:21 +02:00
Mike Hearn
bbac0abf9e Wallet: more @Nullable annotations and generalise the sendCoins argument to take any broadcaster. 2013-07-29 18:35:49 +02:00
Mike Hearn
435d4e85b0 Update copyright year on ForwardingService. 2013-07-29 18:35:26 +02:00
Mike Hearn
9adb275e6d Rename and rewrite PingService. It
It's now just ForwardingService, doesn't use the "from address" concept anymore, and uses WalletAppKit + balance futures. The new code is much simpler and easier to read.
2013-07-29 17:19:28 +02:00
Mike Hearn
f821207a80 WalletAppKit: add a new override-able method that lets you customise objects after they were created, but before chain download starts. 2013-07-29 17:18:48 +02:00
Mike Hearn
872967e96e WalletEventListener: Remove obsolete references to being called on Peer threads from the javadocs. 2013-07-29 17:18:21 +02:00
Mike Hearn
da2a321c23 Wallet: add a missing @Nullable annotation. 2013-07-29 17:17:58 +02:00
Mike Hearn
016837a593 Wallet: expose the calculateAllSpendCandidates method as public. 2013-07-29 13:27:49 +02:00