3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-22 07:05:50 +00:00

626 Commits

Author SHA1 Message Date
Matt Corallo
05a67aef92 Keep track of hash->block mappings
Conflicts:
	core/src/test/java/com/google/bitcoin/core/FullBlockTestGenerator.java
2014-11-14 17:57:57 +01:00
Matt Corallo
4247bc75f6 Help BitcoindComparisonTool work with getheaders requirements 2014-11-14 17:57:57 +01:00
Mike Hearn
ccbd30da8f Delete !notfound code paths. 2014-11-14 17:33:01 +01:00
Andreas Schildbach
f410201342 Fix missing WalletExtensionsTest.tearDown(). This caused a corrupt Wallet.SendRequest.DEFAULT_FEE_PER_KB. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
ae48f18641 Set up encrypted wallet only in tests that need it. Should speed up unit tests a bit. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
91f3d23165 Tests for completing transactions with non-standard fees. 2014-11-14 17:09:36 +01:00
Andreas Schildbach
40b46f0326 Remove IOException from TestWithWallet. 2014-11-14 17:09:36 +01:00
Giannis Dzegoutanis
683c50b3fa made Coin.parseCoin method to throw an IllegalArgumentException instead of an ArithmeticException in cases of fractional satoshis 2014-11-14 16:46:21 +01:00
Mike Hearn
17fae952a7 Move NetworkParameters to first argument in DeterministicKey serialize/deserialize methods, it's more conventional that way. 2014-11-14 16:42:14 +01:00
Wojciech Langiewicz
41f8f5ccb4 Addes NetworkParams as a parameter to DeterministicKey serialization/deserialization. 2014-11-14 16:34:19 +01:00
Mike Hearn
4b31e6c56e Minor cleanup in a wallet unit test 2014-11-14 14:01:30 +01:00
Mike Hearn
b7bac50fa1 Fix a bug in the BIP 62 handling code that can cause a crash for any broadcast multisig transaction. 2014-11-14 14:01:26 +01:00
Mike Hearn
199a741850 Add an OP_RETURN convenience method on ScriptBuilder and convert unit tests to use it. 2014-11-14 14:01:21 +01:00
Wojciech Langiewicz
aafb15a24f Adds one test to the CHECKMULTISIG feature which was failing before 2014-11-10 22:34:23 +01:00
Wojciech Langiewicz
b279c40801 Adds Wallet tests, extracts FooWalletExtension for testing. 2014-11-09 15:49:33 +01:00
Mike Hearn
f6d5644108 Remind myself how to run the postgres unit tests. 2014-11-09 15:49:23 +01:00
Kalpesh Parmar
fbf62614b4 1) Re-factored PostgresFullPrunedBlockStore and H2FullPrunedBlockStore into a generic DatabaseFullPrunedBlockStore class.
2) H2FullPrunedBlockStore now supports calculateBalanceForAddress() method.
3) Created an additional store for MySQL (MySQLFullPrunedBlockStore) and unit test.
4) Fixed unit test PostgresFullPrunedBlockStoreTest, second time execution was failing due to not clearing down the tables correctly.
5) Added methods getOpenTransactionOutputs() & deleteStore() to base class DatabaseFullPrunedBlockStore.
2014-11-09 15:32:48 +01:00
Mike Hearn
e16c357723 Fix another license header. 2014-11-07 18:02:47 +01:00
Andreas Schildbach
c2611b5345 Fix question marks could not be used in payment protocol request URI. Removes the check for multiple question marks in the bitcoin URI.
Also see https://github.com/schildbach/bitcoin-wallet/issues/169
2014-11-07 11:15:58 +01:00
Wojciech Langiewicz
dd37fe90c6 Issue 586 fixed, 0BTC transaction with OP_RETURN will work. 2014-11-05 15:30:05 +01:00
Mike Hearn
855fd2832f Immediately advance current addresses instead of doing it lazily. This avoids a bug whereby an app might quit after using a change address, thus currentKey(CHANGE) == null and it gets reset to the last used address when the wallet is round-tripped.
Unit tests didn't catch this because they didn't simulate the app terminating after the send, and weren't explicitly checking that the change address was different, so improve tests to do those things.

Additionally implement marking as used for married wallets.
2014-11-04 23:21:23 +01:00
Andreas Schildbach
3aac4b0025 Rewrite most references to prodnet to mainnet in the comments. Does not change any actual code. 2014-11-03 14:23:36 +01:00
Mike Hearn
ef4afe8e1c Change the PeerFilterProvider interface to have begin/end methods instead of requiring a lock to be exposed. It's more efficient and flexible. 2014-11-03 13:59:38 +01:00
Wojciech Langiewicz
c11c4d126d Fixes issue 587: disables connecting to local bitcoin node during tests 2014-11-02 16:11:43 +01:00
Alon Muroch
6e40d4d7cd Delete watched scripts methods. Fixed queueOnScriptsChanged threading. 2014-10-31 11:07:59 +01:00
Wojciech Langiewicz
ee08ba4d5d Update toString() in ECKey to include private key in WIF format, adds helper methods with tests. 2014-10-23 22:53:00 +02:00
Mike Hearn
9532fa31a3 Key rotation: fix bug that could cause multiple identical key chains to be created over and over if the key rotation time was equal to the time of the oldest best key, with test coverage. 2014-10-23 15:42:34 +02:00
Mike Hearn
afb05867a9 Fix off by one in DKC.getKeys(false). Resolves #253 2014-10-22 22:00:31 +02:00
Mike Hearn
d4ffd63525 Make basicCategoryStepTest independent of actual min fee level. 2014-10-22 21:51:49 +02:00
Mike Hearn
bb138e70c3 Key rotation: also unit test the creation time of a fresh key. 2014-10-22 20:03:15 +02:00
Mike Hearn
ea02436f96 Rename maybeDoMaintenance to doMaintenance and add a bit more docs. 2014-10-22 19:32:51 +02:00
Mike Hearn
ea7c29e38b Key rotation: construct new HD chain based on the oldest possible key, a la upgrade, with a fresh random HD chain only being created if all random keys are rotating. 2014-10-22 19:32:51 +02:00
Mike Hearn
77ace479d9 Key rotation: remove the enabled setting. It's no longer useful and defaulted to off, which is dangerous and can lead to bugs. 2014-10-22 19:32:51 +02:00
Peter Dettman
bb368c9543 Improve Coin range check to cope with Long.MIN_VALUE correctly 2014-10-17 16:36:29 +02:00
Andreas Schildbach
ca2a9ed8f1 Fix one unexpected case of fiatToCoin overflow and add tests. 2014-10-12 19:25:52 +02:00
Adam Mackler
1a476af542 Overload HD Key deserialization methods with single-argument versions that use a null parent. 2014-10-10 14:31:49 +02:00
Oscar Guindzberg
2010614fd6 Add/Remove wallets to the connected peers as they are added/removed
to/from the PeerGroup
2014-10-09 14:05:16 -03:00
Devrandom
22f0600afe Refactor married keychains
* move handling of following keychains into the leading keychain
* move multisig threshold into the leading keychain
* extract MarriedKeyChain from DeterministicKeyChain
2014-10-07 15:39:04 +02:00
Mike Rosseel
be496b95a3 Implement better support for multiple peer discoveries. Resolves issue 302. 2014-10-07 15:33:58 +02:00
Adam Mackler
2834b7730f Don't fail when deserializing a parentless HD key having depth greater than one.
Currently, deserializing an HD key will fail if both (1) the parent object is null, and
(2) the hierarchy depth is greater than one.  This patch changes that; rather than
throwing an exception, the parent is considered to be the root of the deterministic hierarchy.
2014-10-07 15:27:49 +02:00
Andreas Schildbach
6612e1e1ce Reduce spamminess of message telling us that a script flag isn't handled yet. 2014-10-02 13:47:24 +02:00
Mike Hearn
0a6f901b23 Renamespace to org.bitcoinj away from com.google.bitcoin, as bitcoinj is no longer a Google project and being namespaced under com.google causes issues with Sonatype/Maven Central.
To fixinate your code:

find . -name '*.java' | xargs sed -i .bak 's/import com.google.bitcoin./import org.bitcoinj./g;s/import static com.google.bitcoin./import static org.bitcoinj./g'
2014-09-30 17:05:07 +02:00
Giannis Dzegoutanis
0ccb608c7e fix issue where using an empty seed or entropy value, MnemonicCode does not throw the appropriate exception 2014-09-30 14:43:43 +02:00
Martin Zachrison
036f0bec27 Make PaymentChannel.ServerConnection.paymentIncrease asynchronous. 2014-09-30 14:34:54 +02:00
Adam Mackler
798c341eb1 Change HD-Key path notation to reflect BIP-32. 2014-09-30 14:22:28 +02:00
Giannis Dzegoutanis
a6613f9b9b better handle NetworkParameters in Address to allow other kind of networks 2014-09-30 14:17:31 +02:00
Mike Hearn
e9204fd196 HD Wallets: final part needed before release.
If a key is seen in a filtered block that is too far inside our lookahead zone, discard that block and any further blocks being sent to us by a remote peer and recalculate the Bloom filter after more keys are pre-calculated. Then restart the chain download process. This ensures that we can catch up/replay the block chain and keep up with the deterministic key sequence.
2014-09-23 15:01:22 +02:00
Devrandom
03bacf4fa9 Cache deterministic seed 2014-09-22 15:00:18 +02:00
Mike Hearn
9d235ebc51 Bloom filtering upgrades: can now create FilteredBlock's by applying a BloomFilter to a block. This is primarily intended for unit testing. 2014-09-18 19:56:18 +02:00
Mike Hearn
843e785daf Bloom filtering: Add equals/hashCode/toString to FilteredBlock and PartialMerkleTree then unit test round tripping. 2014-09-18 19:56:18 +02:00