Andreas Schildbach
4e29e4fb00
Wallet: Make SendRequest a top level class.
2016-04-01 22:03:14 +02:00
Andreas Schildbach
1e66b9a8e3
Finish moving wallet related classes to .wallet package.
...
These classes are moved to .wallet:
- Wallet + WalletTest
- WalletExtension + WalletExtensionsTest
- WalletProtobufSerializer
- UnreadableWalletException
These classes are moved to .wallet.listeners:
- WalletEventListener
- WalletChangeEventListener
- WalletCoinsReceivedEventListener
- WalletCoinsSentEventListener
- WalletReorganizeEventListener
- ScriptsChangeEventListener
- AbstractWalletEventListener
- KeyChainEventListener
- AbstractKeyChainEventListener
2016-04-01 21:44:30 +02:00
Andreas Schildbach
e48ced6de3
Remove cent rule from fee solving in Wallet and payment channels.
...
This commit sadly disables WalletTest.basicCategoryStepTest() because that test is not maintainable and
doesn't work any more. Hopefully we will rewrite fee solving together with a better set of unit tests.
2016-04-01 21:10:08 +02:00
Andreas Schildbach
53d2d5625c
Transaction: Print locktime estimation properly formatted.
2016-04-01 21:08:35 +02:00
GreenAddress
f9a0fb2a35
Native ECDSA implementation updated to latest libsecp256k1
2016-04-01 20:33:40 +02:00
Andreas Schildbach
840df06b79
RefreshWallet: Comment how to get a test wallet.
2016-03-30 13:11:44 +02:00
mruddy
8d6d0e2ebc
Update payment channel sequence numbers for time locked transactions with BIP68 and BIP125 in mind.
2016-03-30 13:00:18 +02:00
Andreas Schildbach
9505227616
Wallet: Calculate fee based on feePerKb on byte precision.
...
Transaction.DEFAULT_TX_FEE is increased to make up for a drop in average fees because of the higher precision.
2016-03-27 15:41:57 +02:00
Andreas Schildbach
b1bc34eb76
PaymentChannelStateTest: Make HALF_COIN a constant.
2016-03-27 14:47:13 +02:00
Andreas Schildbach
858b0b41d5
Make sure payment channels heed Context.isEnsureMinRequiredFee().
2016-03-27 13:16:58 +02:00
Andreas Schildbach
c1938fec75
Harmonize license headers.
2016-03-26 19:55:05 +01:00
Andreas Schildbach
d48e810c5d
Utils: Comment and harmonize the various methods for reading ints.
2016-03-26 11:40:23 +01:00
Andreas Schildbach
01365ca00b
Introduce a Transaction.DEFAULT_TX_FEE and use it as a default for sends and for wallet maintenance.
...
Previously we were using Transaction.REFERENCE_DEFAULT_MIN_TX_FEE which is the absolute minimum but it can be
too low. This value should be adjusted from time to time; we're starting with 0.1 mBTC.
2016-03-25 13:35:33 +01:00
Andreas Schildbach
34f2fad07d
WalletTest: Split coinSelection_coinTimesDepth() from feeSolverAndCoinSelectionTests2().
2016-03-25 11:05:12 +01:00
mruddy
2748b35181
Complete the SigHash enum and make updates to stop using the ordinal while preserving the ordinal for any existing code that might use it.
2016-03-25 09:58:48 +01:00
Andreas Schildbach
c02c5ff249
WalletTest: Use sendMoneyToWallet() when faking blocks.
2016-03-25 01:09:48 +01:00
Andreas Schildbach
f92d11e54a
WalletTest: Rewrite assertTrue() conditions to assertEquals(), assertNull(), etc.
2016-03-25 00:20:32 +01:00
Andreas Schildbach
843db1dda3
Wallet: Remove superfluous assignments.
2016-03-24 20:37:09 +01:00
Andreas Schildbach
98bee183b6
WalletTest: Remove paranoid test preconditions.
2016-03-24 20:00:02 +01:00
Andreas Schildbach
a3db2229c1
WalletTest: Split feeSolverAndCoinSelectionTest() into three.
2016-03-24 19:08:31 +01:00
Andreas Schildbach
f3c7b1847c
WalletTest: Use OTHER_ADDRESS constant whenever a test sends coins away.
2016-03-24 18:59:10 +01:00
Willem Noort
9b2ad15cd3
Fix Integer overflow in BitcoinSerializer.BitcoinPacketHeader
2016-03-24 13:52:19 +01:00
Andreas Schildbach
0ebdd5bbea
TransactionInput: Print sequence number in toString().
2016-03-23 14:28:10 +01:00
Andreas Schildbach
5aa4b66c7e
WalletProtobufSerializer: Fix protobuf serialization of large sequence numbers.
2016-03-23 14:17:59 +01:00
kushti
645f2d2572
H2FullPrunedBlockStore: Constructor with H2 database credentials.
2016-03-23 13:28:32 +01:00
Andreas Schildbach
a97f4923b4
Get rid of SendRequest.DEFAULT_FEE_PER_KB "constant".
...
If you have been reading that field, you probably want to use Transaction.REFERENCE_DEFAULT_MIN_TX_FEE.
If you have been writing to that field to change the SendRequest.feePerKb default, use a Context.feePerKb
instead. There is also a new Context.ensureMinRequiredFee.
2016-03-21 21:55:28 +01:00
Andreas Schildbach
2ab367b4e4
SendRequest: New .childPaysForParent() method that constructs a CPFP transaction.
2016-03-21 21:42:38 +01:00
Andreas Schildbach
85f7c39aa5
Refresh bundled checkpoints and switch to textual format for easier audit.
2016-03-21 21:40:14 +01:00
Justas Dobiliauskas
1878f5b9fc
Updated WalletAppKit to allow autosave configuration override
2016-03-21 19:44:57 +01:00
Andreas Schildbach
fae82e0f2b
Message: Switch package-level-protected methods to protected.
2016-03-21 15:14:44 +01:00
mruddy
910544ae57
Transaction: Fix incorrect condition for log message in setLockTime.
2016-03-12 23:10:04 +01:00
Andreas Schildbach
0bc6c04d5f
TransactionOutput: Fix fee calculation in getMinNonDustValue().
...
Adds a test, too.
2016-03-12 22:24:02 +01:00
Andreas Schildbach
90d8c151be
TransactionOutput: New isDust() method, and use it.
2016-03-12 22:23:17 +01:00
Andreas Schildbach
78ae8a0bd7
Wallet: Fix off-by-one when calculating the fee.
2016-03-12 22:06:02 +01:00
Andreas Schildbach
a3c5506a57
Use ScriptBuilder.createOpReturnScript() in tests.
2016-03-12 20:12:58 +01:00
Andreas Schildbach
c3b19bd5cd
Wallet: Get rid of the concept of a "base fee". Fee is always expressed as a rate in Coin per 1000 bytes.
...
SendRequest.fee was removed; use SendRequest.feePerKb for requesting a specific fee rate. If the field
was read for knowing the calculated fee, use SendRequest.tx.getFee() instead.
Also makes a couple of unit tests independent of fee and renames the wallet-tool option --fee to
--fee-per-kb.
2016-03-12 17:37:31 +01:00
Andreas Schildbach
d6002e1ee4
wallet-tool: Properly initialize context.
2016-03-11 21:00:56 +01:00
Andreas Schildbach
814bad4efb
wallet-tool: Use checkpoints to speed up the blockchain sync.
2016-03-11 21:00:56 +01:00
Andreas Schildbach
b6975a2760
wallet-tool: Create watching wallet with specific creation date.
2016-03-11 21:00:51 +01:00
Andreas Schildbach
b024f6e571
KeyChainGroup: Small optimization in toString().
2016-03-11 19:33:09 +01:00
Andreas Schildbach
f70086ae64
Block: toString() cosmetics.
2016-03-11 18:58:23 +01:00
Andreas Schildbach
a22e2f5474
WalletFiles: When saving the wallet, add the 'last block seen' time to the log message.
2016-03-11 18:58:23 +01:00
Andreas Schildbach
eb5605b445
Consistently uppercase constant PARAMS in unit tests, second batch.
2016-03-11 14:28:39 +01:00
Andreas Schildbach
ef0043c41f
DeterministicKeyChain: Print birth date of watching key in toString().
2016-03-11 10:09:01 +01:00
Andreas Schildbach
9aed8ea0a5
For watching wallets, store the key creation time always in the watching key rather than the
...
DeterministicKeyChain. Creation times in the DeterministicKeyChain can't be persisted to protobuf,
as that structure has no full-blown protobuf equivalent.
This means a couple of DeterministicKeyChain, KeyChainGroup and Wallet factory method variants
that take creation dates have been removed. On the other hand, a convenient
Wallet.fromWatchingKeyB58(params, xpub, creationDate) has been added.
Also adds a test for protobuf-roundtripping watching wallets.
Supposed to fix issue #1209 .
2016-03-11 10:08:42 +01:00
Andreas Schildbach
6fcbca10e0
BitcoinURITest: Migrate references to deprecated BitcoinURI.BITCOIN_SCHEME field.
2016-03-10 21:40:59 +01:00
Andreas Schildbach
7ad2da9ab1
Wallet: Hide Wallet(Context, KeyChainGroup) constructor.
2016-03-08 16:33:17 +01:00
Andreas Schildbach
b3583d5d7d
Change fee calculation in Wallet.adjustOutputDownwardsForFee():
...
- Cent rule is removed
- Fee based on feePerKb is calculated on byte precision
This change affects the special cases of emptying and rekeying wallets. Fee calculation of standard transactions is unaffected for now.
2016-03-08 16:02:11 +01:00
Andreas Schildbach
c7462a4541
Sha256Hash: Replace hardcoded 32 values by a LENGTH constant.
2016-03-07 13:07:14 +01:00
Andreas Schildbach
4b75c336bb
Sha256Hash: Fix compareTo() not being consistent with equals().
2016-03-07 12:56:35 +01:00