3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 15:22:16 +00:00
Commit Graph

1454 Commits

Author SHA1 Message Date
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
Mike Hearn
cc8925ed0f Integrate checkpoints into WalletAppKit so they're used by default in the non-Android context. 2014-10-07 15:16:39 +02:00
Mike Hearn
99de477c0d Extend exception message to help track down flaky test. 2014-10-07 13:47:02 +02:00
Sebastian Ortega
42f9d7c193 Use daemon threads on FullPrunedBlockChain
This way, the thread pool used to run the transaction scripts won’t
prevent applications from exiting.
2014-10-07 12:01:00 +02:00
Mike Hearn
83995e9284 Suppress noisy log line during signing. 2014-10-06 13:57:45 +02:00
Mike Hearn
4a27afaac0 Clear static analysis warning: null check is useless at this point. 2014-10-06 13:57:37 +02:00
Mike Hearn
9dcc4ed6f4 0.13-SNAPSHOT 2014-10-05 20:38:00 +02:00
Mike Hearn
83a9a71f3f bitcoinj 0.12 2014-10-03 00:46:31 +02:00
Mike Hearn
6f22cba76f Maven changes to support auto upload of snapshot versions, better javadocs etc. 2014-10-02 14:22:25 +02:00
Mike Hearn
0914c82f69 Add package-info files for the javadocs. 2014-10-02 13:55:22 +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
Andreas Schildbach
9e4043d9bb Change groupId of Orchid artifact to "org.bitcoinj". This makes uploads to Maven Central easier for us. 2014-10-01 20:27:01 +02:00
Mike Hearn
4172bbcbe1 Script: Add MAX_P2SH_SIGOPS constant. 2014-10-01 16:21:08 +02:00
Mike Hearn
596f7cff04 Add a ScriptChunk.decodeOpN method. 2014-10-01 15:54:55 +02:00
Mike Hearn
ba4aeff2a5 Script: expose execute publicly 2014-10-01 15:54:42 +02:00
Mike Hearn
a8f85d1158 DefaultRiskAnalysis: extract output testing into a separate method also, and add a (presently unused) new rule violation type. 2014-10-01 15:54:31 +02:00
Mike Hearn
5fc98d2c07 Extract input standardness check into a separate callable method. 2014-10-01 14:14:34 +02:00
Mike Hearn
c5a564e152 Make the ScriptBuilder API a bit more flexible and better documented. 2014-10-01 14:14:15 +02:00
Mike Hearn
1da4002a4b Fix toString in payment channels for Coin conversion 2014-09-30 18:26:36 +02:00
Mike Hearn
9c12d73d12 Fix build 2014-09-30 18:24:19 +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
48de05ac0f Separate Transaction and Wallet classes 2014-09-30 15:41:13 +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
Mike Hearn
f237908308 Minor whitespace changes. 2014-09-22 20:07:47 +02:00
Devrandom
03bacf4fa9 Cache deterministic seed 2014-09-22 15:00:18 +02:00
Mike Hearn
a8e227ae1b PeerGroup: deduplicate bloom filter recalc events.
This whole thing needs to be refactored and rewritten to avoid having it be done on a separate thread.
2014-09-21 18:02:51 +02:00
Mike Hearn
753e0571e9 Narrow return type in unit test utility 2014-09-21 18:01:49 +02:00
Mike Hearn
9c355f01e6 PeerFilterProvider: minor comment updates 2014-09-21 18:00:52 +02:00
Mike Hearn
ec320ecfd5 GetDataMessage: add utilities 2014-09-21 17:54:55 +02:00
Mike Hearn
ecec739438 BloomFilter: provide transactions to a created FilteredBlock 2014-09-21 17:54:24 +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
f9659f08a2 PeerGroup: take out noisy debug log 2014-09-18 19:56:18 +02:00
Mike Hearn
88c4918f93 Script: better comment. 2014-09-18 19:56:18 +02:00
Mike Hearn
40c73eeac2 Script: take out obsolete todo comment. 2014-09-18 19:56:18 +02:00
Mike Hearn
8d83f4d25b Bloom filtering: add a convenience BloomFilter.insert(ECKey) method. 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
Mike Hearn
d94d5bee8e Try slightly more useful error log in NioClientManager.handleKey whilst still keeping it concise. 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
Andreas Schildbach
aa14af564e Reduce log level of marked/un-marked messages to debug. It produces huge log files. 2014-09-11 15:08:36 +02:00
Kosta Korenkov
e1a4af2052 MissingSigResolutionSigner works for raw multi-sig 2014-09-11 19:37:14 +08:00
Kosta Korenkov
77f414fc62 Signers: skip signing if input is fully signed already 2014-09-11 19:18:09 +08:00
Kosta Korenkov
cf5089697b Fix extra signature added to the full scriptSig 2014-09-11 14:51:34 +08:00
Andreas Schildbach
3e5e3496ea Introduce textual checkpoint format. It's basically one base64-encoded line per checkpoint.
The BuildCheckpoints tool now generates and sanity checks both formats.
2014-09-10 17:59:41 +02:00
Adam Mackler
34214533c9 Take only as much time as necessary to open circuits for peer-IP DNS lookups
This patch addresses two suboptimal behaviors in the `TorDiscovery` class:

1. Currently it uses the DNS-lookup timeout as the timeout for opening
   circuits as well as for actually looking up the IP numbers.  It may
   be this timeout value, which is five seconds hard-coded into the
   `PeerGroup` class, was not intended for this purpose.  Moreover,
   the `TorConfig` class has a value, circuitBuildTimeout, apparently
   for this purpose; at least its default of 60 seconds may be more
   appropriate for this purpose than the five-second lookup timeout.

2. Currently, the process of opening circuits for the DNS lookups will
   take exactly as long as the timeout value, no more, no less, which
   practically guarantees that the client will either wait longer than
   necessary, or else experience timeout errors that could have been
   avoided by waiting a bit longer.

The changes herein use the return value of`TorConfig.getCircuitBuildTimeout()`
as the timeout for opening circuits, rather than using the DNS lookup
timeout value that is passed by `PeerGroup` as an argument to
`PeerDiscovery.getPeers()`.  Moreover, as soon as a circuit either has
been opened or failed to be opened for each router, the DNS lookups
then begin without waiting for the timeout time to elapse.

Notes:

1. There are no tests with these changes.  There don't seem to be any
   tests for the `TorDiscovery` class.  There probably ought to be.

2. The `TorDiscovery` class's DNS lookup procedure has the same
   timeout characteristic as the one this patch removes from the
   circuit-opening procedure, namely it waits for as long as the
   timeout value, no more no less.  If the changes proposed in this
   patch are acceptable, I would consider making the same change for
   the process of looking up the peer IP numbers.
2014-09-10 13:19:47 +02: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