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
Andreas Schildbach
57bec6165b
Parse verifyFlags from script and tx JSON tests. In addition to P2SH (previously known as enforceP2SH), NULLDUMMY is implemented.
...
Update all script and tx JSON tests from Bitcoin Core.
2014-09-13 23:28:57 +02:00
Kosta Korenkov
cf5089697b
Fix extra signature added to the full scriptSig
2014-09-11 14:51:34 +08:00
Kosta Korenkov
691de1d22b
Signers: Share keypaths for watching wallets
...
Now LocalTransactionSigner populates ProposedTransaction.keyPaths map even if
there is no private key in the wallet. Other signers may take advantage
of that.
2014-09-10 13:08:49 +02:00
Kosta Korenkov
f4879e22a6
Signers: Share keypaths for watching wallets
...
Now LocalTransactionSigner populates ProposedTransaction.keyPaths map even if
there is no private key in the wallet. Other signers may take advantage
of that.
2014-09-09 23:26:14 +02:00
Kosta Korenkov
5910a7f25e
Married wallets: multisig threshold could be specified
...
That allows to create multisigs like 3-of-3. If not specified, majority of
keys will be required (2-of-3, 3-of-5 and so on)
2014-09-09 14:23:32 +02:00
Andreas Schildbach
96107b8b91
Replace "poor man's (aka. really, really poor) JSON parser" by Jackson for the script and tx tests.
...
The tests semantics was unchanged. 161 lines of code removed.
2014-09-09 14:19:49 +02:00
Devrandom
1f39dcdc6f
Always use position 0 for LocalTransactionSigner sig, we don't know in advance what position we'll end up in
...
Fix p2sh bloom filter construction
Proper signature insertion for P2SH scriptSig
2014-09-09 14:15:54 +02:00
Martin Zachrison
63b4b179e0
Payment channel API. Negotiation af the channel duration.
...
1. Client requests a time window, in seconds relative to now.
2. Server suggests an expire time, absolute time in seconds
3. Client accepts or rejects the servers proposal.
Note that the IPaymentChannelClient.ClinentConnection interface has a new method. This will break old implementations.
Let the client request the duration of a payment channel. Server can set allowed time window.
2014-09-09 13:29:22 +02:00
Mike Hearn
2b01508e10
Peer: fix the case where dependency download is disabled. It wasn't sending transactions to the wallet before. Add a test for this and add accessors for the setting.
2014-09-08 18:24:44 +02:00
Andreas Schildbach
2b80e4cfd1
Update script JSON tests from upstream.
2014-09-08 13:07:03 +02:00
Mike Hearn
c8803bdefe
WalletTest: Better unit test failure message to check if the test is flaky.
2014-09-08 13:01:07 +02:00
Kosta Korenkov
c2d19a31a8
Wallet throws on missing signature by default
...
Using dummy sigs by default may be confusing for multi-sig scenarios.
See: https://groups.google.com/forum/#!topic/bitcoinj/PEhZGk3WMxU
2014-09-05 12:06:55 +02:00
Andreas Schildbach
ae24da4f9c
When manually constructing SimpleDateFormat, specify Locale.US or otherwise we may end up on non-latin scripts.
...
See SimpleDateFormat javadoc for a discussion.
2014-09-04 14:17:23 +02:00
Andreas Schildbach
7d930554a6
Support for recording a memo with transactions. It can be used to record the memo of the payment request that initiated the transaction. Use the new SendRequest.memo register.
2014-09-03 16:13:41 +02:00
Mike Hearn
ed75774605
Transaction.verify: make it throw VerificationException subclasses, and add a check for duplicated outpoints.
...
This check does not have any impact on existing apps as in full verification mode the UTXO set is already effectively performing this check, and general SPV wallets don't verify inputs meaningfully anyway (they could just be random). However it's useful for Lighthouse and can't hurt - a tx with a duplicated outpoint is always invalid.
2014-09-01 17:06:41 +02:00
Kosta Korenkov
6579d72bd8
Add SendRequest.missingSigsMode
...
Instead of useDummySignatures flag there is now a MissingSigMode enum
allowing to specify what to do with missing signatures.
Available modes:
USE_OP_ZERO - do nothing. OP_0 will be left in place of missing
signature
USE_DUMMY_SIG - insert dummy signature in place of missing sig.
THROW - throw an exception. It would be either MissingSignatureException
for P2SH or MissingPrivateKeyException for other tx types
Default mode is USE_DUMMY_SIG (for backward compatibility)
2014-09-01 13:10:51 +07:00
Andreas Schildbach
b1176e0fdf
Rename CoinFormat to MonetaryFormat, now that it can deal with Coin and Fiat mostly the same way.
2014-08-28 14:45:36 +02:00
Andreas Schildbach
5be769d4ca
Support for applications recording exchange rate that was valid when transaction was sent. Use the new SendRequest.exchangeRate register.
...
Includes a test.
2014-08-28 14:32:26 +02:00
Andreas Schildbach
f3733cae3b
Configure CoinFormat with values from a Locale.
2014-08-25 01:03:59 +02:00
Andreas Schildbach
9e91c54fdd
Formatting and parsing of monetary values with non-arabic digits.
2014-08-25 01:03:57 +02:00
Andreas Schildbach
ad6adea0c5
Overload Script.getToAddress() with a variant that tries harder to determine a destination address.
...
I ended up duplicating this piece of code several times, so I thought it may be useful to have it in the framework.
Includes tests.
2014-08-24 23:13:20 +02:00
Mike Hearn
308de4edc1
Fix or comment out a few Java 7isms.
2014-08-24 01:02:44 +02:00