Commit Graph

  • 5219a42df9 Wallet: refactor saving code into a separate class that uses a Java scheduled executor rather than the messy and likely buggy custom threading code. Synchronously save the wallet on way more codepaths, now we only do write coalescing for new best block notifications. Mike Hearn 2013-07-10 14:41:12 +02:00
  • acc2877329 Reject dust outputs with ensureMinRequiredFee (fixes #429) Matt Corallo 2013-07-10 16:25:48 +02:00
  • 48cee2e668 KeyCrypterScrypt: Fix some minor code style issues. Mike Hearn 2013-07-10 16:27:01 +02:00
  • 53dc5c2e6a Make Andreas happy. Resolves issue 423. Mike Hearn 2013-07-10 16:23:05 +02:00
  • b51485ca23 Peer Bloom filter generation -> new PeerFilterProvider interface Matt Corallo 2013-07-09 19:07:05 +02:00
  • 2061d28e52 Use direct byte buffers instead of normal ones in niowrapper Matt Corallo 2013-07-09 16:36:15 +02:00
  • e6965d0217 Always accept time-locked txn we create, make refund tx source self Matt Corallo 2013-07-09 13:32:41 +02:00
  • 1277df32d8 Fix a few minor typos. Matt Corallo 2013-07-09 19:06:52 +02:00
  • 2c44a4fad7 PeerGroup: Require Bloom-filtering capable peers by default. Resolves issue 421. Mike Hearn 2013-07-10 15:52:09 +02:00
  • 34d804ecca PeerGroup: fix naming of vPingTimer Mike Hearn 2013-07-10 15:33:24 +02:00
  • 5b78601b4a Wallet: make last seen block height default to zero not -1 Mike Hearn 2013-07-10 15:32:36 +02:00
  • d92314dd18 Peer/Group: Clear some static analysis warnings related to the (buggy) optionality of the block chain and some threading issues. Mike Hearn 2013-07-10 15:32:20 +02:00
  • 4c0930a961 AbstractBlockChain: Correct minor logging issue Mike Hearn 2013-07-10 14:42:47 +02:00
  • 8a74b3da2c Minor logging fixes. Resolves issue 423. Mike Hearn 2013-07-09 14:57:20 +02:00
  • f473267da2 Exception handling: provide a global variable in Threading that receives all unhandled exceptions from all framework threads. Mike Hearn 2013-07-09 14:47:38 +02:00
  • ea19d3164a TCPNetworkConnection: allow manually constructed one-offs to be given a Peer object. Mike Hearn 2013-07-09 14:43:37 +02:00
  • e3e80c357d BitcoinSerializer: Remove some optimisations that date from the time when someone was trying to make bitcoinj into a super scalable multiplexor, and allow writing of arbitrary byte arrays that get checksummed and prefixed. Mike Hearn 2013-07-09 14:43:12 +02:00
  • 975dea6e16 VersionAck: Delete some whitespace Mike Hearn 2013-07-09 14:42:28 +02:00
  • 09752848bb Announce transactions to wallet in order even from FilteredBlocks Matt Corallo 2013-07-08 17:35:41 +02:00
  • a05d69537d Remove JavaDocs from AbstractWalletEventListener so IDEs will automatically inherit them. Mike Hearn 2013-07-08 13:24:32 +02:00
  • 24b825252f Fix a bogus assert in Threading Mike Hearn 2013-07-05 14:21:43 +02:00
  • 8869e57fa0 AbstractBlockChain: add a bit more logging. Mike Hearn 2013-07-05 13:27:19 +02:00
  • 573e04491c Threading: fix the user thread to be daemon so programs can shut down properly again. Mike Hearn 2013-07-05 12:23:28 +02:00
  • a8a8d3a044 AbstractBlockChain: Fix some nullity annotations and a few other misc things. Mike Hearn 2013-07-05 11:56:27 +02:00
  • d316cf316f AbstractBlockChain: Replace mention of BOBS in class javadoc with SPVBlockChain. Mike Hearn 2013-07-05 11:48:28 +02:00
  • aaa71c0811 Fix AbstractBlockChain.removeListener. Found by IntelliJ. Mike Hearn 2013-07-05 11:47:42 +02:00
  • 35a7f38d86 Make block chain listeners run in given executors and default to the user thread. Mike Hearn 2013-07-01 11:42:42 +02:00
  • 2537ff47b5 Extend executor-specific event handlers to PeerGroup and Peer. Rename Threading.sameThread to Threading.SAME_THREAD Mike Hearn 2013-06-28 17:11:14 +02:00
  • 50b71979bb Fix removal of event listeners. Make PeerGroup also allow specification of arbitrary executors and run event listeners in those. Mike Hearn 2013-06-25 16:42:16 +02:00
  • c552c0cbdd Move ListenerRegistration out into utils and make it generic. Mike Hearn 2013-06-25 15:30:55 +02:00
  • f6d14db8e6 Wallet: allow choice of executor to run event listeners in, default to user thread. Mike Hearn 2013-06-25 15:19:10 +02:00
  • 3185923d4a Add @Override annotations to PeerEventListener. Mike Hearn 2013-06-24 15:44:25 +02:00
  • cdd1c5e38a Change onKeyAdded to be onKeysAdded that takes a list, and run it in the user thread. Mike Hearn 2013-06-24 15:16:14 +02:00
  • 0907a3852b Add a test to ensure that wallet listeners that throw exceptions don't prevent the others from running. Mike Hearn 2013-06-21 12:37:27 +02:00
  • dd83d55df4 Add JavaDocs for TransactionConfidence.Listener.Reason Mike Hearn 2013-06-21 12:37:11 +02:00
  • a28cb5c59a Don't mark transactions that have just been completed as pending, and then fix a stupid efficiency bug in AbstractBlockChain that was revealed by the change. Mike Hearn 2013-06-20 15:04:18 +02:00
  • 6b7d653614 Major rework of how confidence listeners are called: Mike Hearn 2013-06-20 14:47:16 +02:00
  • 5de80dfedf Introduce a user code thread which is used for running event listeners. Mike Hearn 2013-06-19 17:54:19 +02:00
  • b87879fd42 Rename the Locks class to Threading in preparation for more stuff. Mike Hearn 2013-06-19 16:06:06 +02:00
  • 1296074e8f Add another Block c'tor. Resolves issue 424. Mike Hearn 2013-07-04 12:12:52 +02:00
  • 4265e9c692 Optimize imports in payment channels. Mike Hearn 2013-07-03 15:18:20 +02:00
  • 715e3596d2 Fix another deadlock when storing channel in wallet Matt Corallo 2013-07-02 20:56:28 +02:00
  • 8fd8683461 JavaDoc in StoredServerChannel + updateValueToMe s/public// Matt Corallo 2013-07-02 16:27:55 +02:00
  • c36e725d7d Use Reentrant locks in a few more places, fix deadlocks(s) on close Matt Corallo 2013-07-02 16:26:15 +02:00
  • 2d84b3c27b Deasymock PaymentChannelStateTest Mike Hearn 2013-07-03 14:49:43 +02:00
  • a5940282d0 Rewrite ChannelConnectionTest to avoid easyMock, duplication and busy wait loops. Mike Hearn 2013-07-01 13:51:33 +02:00
  • 93abc34e08 Narrow PeerGroup -> TransactionBroadcaster in the channels code. Mike Hearn 2013-07-01 13:17:57 +02:00
  • ec51162ae4 Correct PaymentChannelServerListener class javadoc. Mike Hearn 2013-07-01 13:13:29 +02:00
  • 4908c241f7 Implement server-side and client-side payment channel protocols. Matt Corallo 2013-06-26 23:59:56 +02:00
  • 3d74934b6f Add a length-prefixed protobuf connection server/client. Matt Corallo 2013-06-26 23:57:21 +02:00
  • 65202b8ab5 Add support for WalletExtensions to WalletAppKit. Matt Corallo 2013-06-26 23:56:04 +02:00
  • 880b413b24 Add a TransactionBroadcaster abstraction to PeerGroup. Matt Corallo 2013-06-26 23:55:34 +02:00
  • 7cd38bc77a Wallet: Enable autoSaveListener for 0-delay autosave. Matt Corallo 2013-06-26 23:15:01 +02:00
  • c4572696b1 Some fixes to wallet serialization: 1) Switch the outpoint index field to be uint32 and fix isCoinBase() to consider the unsigned versions only. Resolves issue 420. 2) Regenerate the protobuf and fix an out of date definition in WalletProtobufSerializer that it exposed. Mike Hearn 2013-06-27 14:01:02 +02:00
  • 7f68923529 KeyCrypterScryptTest: Clear static analysis warnings and port to junit 4. Mike Hearn 2013-06-24 17:52:09 +02:00
  • 0c00b24bbc Disable native secp256k1 so DCE can delete the relevant code entirely. Mike Hearn 2013-06-24 17:48:58 +02:00
  • fbd767320c Delete the long since obsolete DiskBlockStore. Mike Hearn 2013-06-20 15:10:47 +02:00
  • 85cd4499f9 Delete NamedSemaphores. It's something that was introduced by Miron and looks like a broken attempt to implement file locking. Neither store that tried to use it is supporte anymore so don't bother replacing with real file locks. Mike Hearn 2013-06-19 15:43:18 +02:00
  • 4d4768ba8c Fixup last commit Mike Hearn 2013-06-19 15:34:05 +02:00
  • ad3bb53327 Allow TransactionInput.verify to take an output as a parameter. Mike Hearn 2013-06-19 13:07:32 +02:00
  • f98088221e Make TransactionOutput.getMinNonDustValue() more documented and provide a simpler function for it. Mike Hearn 2013-06-18 13:56:53 +02:00
  • 215a131f8b Typo fix in ECKey Mike Hearn 2013-06-18 13:56:16 +02:00
  • 354446dd40 Add new helper methods to Transaction[Signature] Mike Hearn 2013-06-18 17:38:53 +02:00
  • 57c1ecbd01 Refactor some code in ECKey into ECKey.ECDSASignature, and introduce a new TransactionSignature class. Mike Hearn 2013-06-18 16:24:52 +02:00
  • 2149fea7e6 TODO: KeyCrypterScryptTest sometimes fails because key crypto is still relying on padding bytes in some cases. Mike Hearn 2013-06-18 17:31:46 +02:00
  • 5be443c2d3 Clear some minor static analysis warnings. Mike Hearn 2013-06-18 16:33:56 +02:00
  • 8b8bf50144 Version 0.10-SNAPSHOT Mike Hearn 2013-06-18 16:33:06 +02:00
  • 67b187c4c4 Version 0.9 v0.9 1763913889567411485/tmp_refs/tags/v0.9 1756462455774015844/tmp_refs/tags/v0.9 Mike Hearn 2013-06-17 15:52:37 +02:00
  • bfbc9c0cf6 Don't use my DNS seed. It's not running on secure hosting so I shut it down. Mike Hearn 2013-06-17 16:11:20 +02:00
  • 4494d34be0 Use correct private key header byte in reg test mode. Mike Hearn 2013-06-17 15:43:57 +02:00
  • 960bf2626b DumpedPrivateKey: Verify that the final byte is set to 1. Resolves issue 411. Mike Hearn 2013-06-17 15:43:46 +02:00
  • 332967f0bd PingService: allow usage of regtest mode, always include a fee in the bounce transaction, don't use from addresses anymore. Mike Hearn 2013-06-17 14:57:02 +02:00
  • d8a0cc59c1 Re-order ECKey imports. Mike Hearn 2013-06-17 14:28:48 +02:00
  • be88a05c93 Make TransactionOutput.getMinNonDustOutput exact. Matt Corallo 2013-06-16 20:48:06 +02:00
  • d6fec93be3 Add canonical signature/pubkey methods to ECKey and tests therefor. Matt Corallo 2013-06-16 17:26:00 +02:00
  • ec3708d159 Introduce SIGHASH_ANYONECANPAY_VALUE to replace 0x80 constants. Matt Corallo 2013-06-16 17:21:21 +02:00
  • 1e24dea569 Fix wallet extensions by adding setKeyCrypter and using auto-save. Matt Corallo 2013-06-11 22:49:59 +02:00
  • e2e72a275d Fix deserialization of wallet transactions with a far-out locktime. Matt Corallo 2013-06-11 22:52:54 +02:00
  • 63be9b705b Make all addOutputs and addInputs return the newly added in/output. Matt Corallo 2013-06-11 11:06:26 +02:00
  • 5f1a9c246b Add Wallet.maybeCommitTx to not throw when tx is already in pending Matt Corallo 2013-06-14 14:19:06 +02:00
  • 74110a12d9 Note that a tx of exactly 1000 bytes may overpay. Mike Hearn 2013-06-12 17:42:18 +02:00
  • c91e811fc7 Make SendRequest.completed back to being private. Mike Hearn 2013-06-12 17:26:12 +02:00
  • 87ab410a2f Make feePerKb apply to the first kilobyte as well. Mike Hearn 2013-06-12 17:16:07 +02:00
  • c9f0ecae3d Delete 3 fee tests that weren't adding any coverage and Matt can't remember what they're for. Mike Hearn 2013-06-12 16:20:55 +02:00
  • 1d9ebf5a5f WalletTool: allow use of regtest mode, fix unixtime flag, make address printed by ADD_KEY double clickable. Mike Hearn 2013-06-12 11:13:01 +02:00
  • 5b50e52842 Don't require 4G heap for wallet tool. Mike Hearn 2013-06-12 11:12:15 +02:00
  • 20049fb9f8 Use RegTestParams.get() Mike Hearn 2013-06-12 11:11:48 +02:00
  • 80b66a8945 Split a bit more code out of the giant fee calculation function. Mike Hearn 2013-06-11 12:29:28 +02:00
  • b865e6a510 Make Transaction.addInput(TransactionOutput) return the created input. Use it to make a minor simplification. Mike Hearn 2013-06-11 12:24:14 +02:00
  • 6077d32c4a Refactor fee calculation out of wallet.completeTx(). Introduce a (not widely used yet) InsufficientMoneyException. Mike Hearn 2013-06-11 12:21:20 +02:00
  • 46914b12b7 Make completeTx once again return a bool (pending replacement with an exception), and update the fee field with the calculated fee. Mike Hearn 2013-06-11 11:40:40 +02:00
  • afaebd062a Rename enforceDefaultClientFeeRelayRules to ensureMinRequiredFee which is shorter. Mike Hearn 2013-06-10 16:02:38 +02:00
  • 9a389c9475 Move enforceDefaultClientFeeRelayRules into SendRequest instead of being a parameter. Make WalletTool enforce the rules instead of ignoring them (this was an oversight). Mike Hearn 2013-06-10 15:51:34 +02:00
  • 518b7edcbd Handle null hostNames in DnsDiscovery (some NP have that). Matt Corallo 2013-06-07 12:45:46 +02:00
  • c9d411e8e7 Add two new WalletExtension access methods. Matt Corallo 2013-06-05 16:59:52 +02:00
  • a3f1fe5390 Tweak WalletExtension slightly. Matt Corallo 2013-06-04 19:02:00 +02:00
  • a7987585b8 Catch out-of-bound reads and rethrow as ProtocolExceptions. Matt Corallo 2013-05-28 17:17:05 +02:00
  • dbf7728b4f Add uint64ToByteArrayLE to Utils. Matt Corallo 2013-06-10 11:12:17 +02:00
  • a525f878ca More fixing of regtest params. Mike Hearn 2013-06-07 16:15:36 +02:00
  • 90fda575b6 Make bitcoind comparison tool simple to run again. Mike Hearn 2013-06-07 13:59:20 +02:00