Andreas Schildbach
73467ea4c9
WalletTest: Clean up some assert messages.
2016-01-01 14:37:47 +01:00
Andreas Schildbach
720f7d2a92
Print transaction purpose in toString().
2015-12-20 09:52:11 +01:00
Jameson Lopp
ab169f0700
Print block hash in debug log message for unconnectable orphan.
2015-12-18 16:12:55 -05:00
Andreas Schildbach
44ca39bfd7
Coin: Remove chain-specific coin limit. Add some checks for arithmetic over/underflows instead.
2015-12-13 19:30:54 +01:00
Kirill Vlasov
3ab1d5811d
PeerGroup: Closing streams and sockets where necessary
2015-12-13 19:30:11 +01:00
Andreas Schildbach
6692c0e06b
Set minimum fee to 5000 satoshis and dust limit to 2730 satoshis. This matches Bitcoin Core 0.11.1.
2015-12-13 19:25:22 +01:00
Kirill Vlasov
0ba3f4c2d2
"@Override" annotation should be used on any method overriding (since Java 5) or implementing (since Java 6) another one.
2015-12-08 10:29:40 +01:00
Andreas Schildbach
313e2c14c1
When testing for specific network, use network ID.
2015-12-06 18:14:03 +01:00
Andreas Schildbach
c0b2e7cd74
UnitTestParams: Remove static address/key pair for testing. It wasn't really used by the unit tests.
2015-12-05 21:34:14 +01:00
Andreas Schildbach
be794e8a4c
Use Guava Stopwatch for measuring code execution time.
2015-12-05 11:06:29 +01:00
Andreas Schildbach
90be18150f
Migrate a few asserts to Guava checkArgument/checkState.
2015-12-05 10:59:55 +01:00
Andreas Schildbach
0603afe78d
TransactionInput: Don't misuse NO_SEQUENCE constant for indicating an unconnected input.
2015-12-05 10:53:28 +01:00
Andreas Schildbach
7cb7fecb22
Replace documentation references to "Satoshi/official/reference client/implementation" by "Bitcoin Core".
...
No code is changed.
2015-12-05 10:44:52 +01:00
Andreas Schildbach
b031d65d7d
Add precondition message to Wallet.setKeyRotationTime().
2015-12-05 10:42:55 +01:00
Andreas Schildbach
7001c479a3
Block: Fix missing linefeed after hash in toString().
2015-11-30 22:25:21 +01:00
Andreas Schildbach
6b95012d1f
wallet.proto: Add IN_CONFLICT transaction confidence state.
2015-11-29 11:33:16 +01:00
Oscar Guindzberg
293591bf24
Support double spend forwarding
...
This adds a new IN_CONFLICT transaction confidence type, meaning there is another transaction
(or several other transactions) spending one (or several) of its inputs but nor this transaction
nor the other/s transaction/s are included in the best chain.
2015-11-29 10:30:34 +01:00
Will Shackleton
61377297ae
Script: Fix behaviour of OP_0 to not NullPointerException.
2015-11-28 12:08:33 +01:00
c
c1fce47c5f
Added some wallet utility methods getTotalReceived() and getTotalSent() and a test for them.
2015-11-28 11:58:24 +01:00
Andreas Schildbach
7fce16b3c1
DefaultRiskAnalysis.MIN_ANALYSIS_NONDUST_OUTPUT: Re-use existing constant and update comment.
2015-11-28 10:51:20 +01:00
Andreas Schildbach
79d6716120
Wallet-Tool: New action to modify the creation time of wallets.
...
This is useful for repairing wallets that accidently have been created "in the future".
2015-11-27 16:54:55 +01:00
cyberzac
3966f424a0
Copy accessor for the channel map
2015-11-27 16:49:58 +01:00
Ross Nicoll
ff2e057126
Enable CHECKLOCKTIMEVERIFY on version 4 blocks after a 75% majority.
2015-11-23 17:29:50 +01:00
Ross Nicoll
70f557a514
Add OP_CHECKLOCKTIMEVERIFY script support
2015-11-23 17:29:10 +01:00
Ross Nicoll
92bd6d0af1
Add transaction tests for OP_CHECKLOCKTIMEVERIFY
2015-11-23 17:23:43 +01:00
Andreas Schildbach
f9097ab408
Block: Print hash in toString().
2015-11-23 16:54:43 +01:00
Andreas Schildbach
63a5e3b410
Block: Add convenience methods for BIP conformance (BIP34, BIP66, BIP65, BIP101). Also list BIPs in Block.toString().
2015-11-23 16:54:43 +01:00
Andreas Schildbach
fe736d2554
Fold CoinbaseBlockTest into BlockTest.
2015-11-23 16:39:05 +01:00
Ross Nicoll
723df867ff
Genericise script number encoder
...
This replaces the limited script number encoder previously used for block
height with a version that matches the exact format generated by Bitcoin
Core (which can include an additional byte for sign in some cases).
With thanks to Kalpesh Parmar for pointing out that some blocks on the
testnet have coinbase transactions with height encoded in 2 bytes.
2015-11-20 18:58:10 +00:00
Andreas Schildbach
d08bda2ae4
CoinbaseBlockTest: Convert some file loading code to use Guava.
2015-11-19 22:40:58 +01:00
Ross Nicoll
ad42302355
Add hooks to override protocol version numbers
2015-10-31 16:18:17 +01:00
Ross Nicoll
377d226ef1
Enforce the LOW_S script validation flag
2015-10-31 16:10:48 +01:00
Ross Nicoll
92df23c979
Added LOW_S script flag test case generator
2015-10-31 16:10:40 +01:00
Ross Nicoll
344c4c3baa
Enforce v4 block switchover
...
This enforces the switch over to block v4 once a supermajority is met, as
per BIP65.
2015-10-28 10:34:57 +01:00
Andreas Schildbach
1c8a60d2ef
Don't add timestamps to JavaDoc.
...
It's pretty useless and it stands in the way of reproducible builds.
2015-10-25 14:39:49 +01:00
langerhans
a6d3bbbb77
Remove redundant return statements
2015-10-24 19:44:34 +02:00
Andreas Schildbach
4a735008a5
Make peer discovery timeout configurable. Add milliseconds to error message if timeout kicks in.
2015-10-21 18:07:25 +02:00
Ross Nicoll
4a3d702397
Correct coinbase height script validation
...
Changes coinbase height validation to check for the bytes at the start of
the coinbase script, and ignore everything after them. The validation then
matches Bitcoin Core.
Also update error messages to more closely match latest Bitcoin Core.
2015-10-21 15:00:44 +02:00
ollekullberg
724cf7de36
Close increasePaymentFuture when receiving an ERROR from the server.
2015-10-21 14:56:18 +02:00
Ross Nicoll
829e147ec7
Add script verification flags for DER format
...
Add script verification flags for DER format encoding, low-S signatures
and strict encoding.
Pass script verification flags through to signature parser.
Convert block verification flags to a sub-enum of Block.
Remove DER signature format verification flag from block flags.
Add test transaction with a non-standard DER signature, with the verify
flag set/unset accordingly, to tx_invalid.json and tx_valid.json
2015-10-20 13:37:27 +02:00
Ross Nicoll
1c74aac27e
Add support for block headers of variable length, when parsing headers messages.
2015-10-18 17:45:06 +01:00
Ross Nicoll
e136642807
Correct length of block header when hashing at an offset
2015-10-18 17:10:56 +02:00
Marc-André Tremblay
4379ca7b94
Fix how key depth is determined.
...
The way it was previously done before did not allow to properly derive keys which had their position concealed in the hierarchy.
Signed-off-by: Marc-André Tremblay <marcandre.tr@gmail.com>
2015-10-18 17:03:49 +02:00
Ross Nicoll
df56a23f09
Clean up MessageSerializer to simplify subclasses
...
By replacing MessageSerializer with an abstract class, methods which
should just call other methods in the same class are now fixed, and
subclasses only have to override a single abstract method instead of
multiple.
2015-10-18 16:37:49 +02:00
Ross Nicoll
4375f66d20
Replace magic numbers for header sizes with constants
2015-10-18 12:37:27 +02:00
Andreas Schildbach
a4c9ad6894
Make transactions with signatures with "high" S component violate the "canonical encoding" rule.
...
This makes those transactions non-standard and risky. By default, they will not be accepted into wallets unless confirmed by the block chain.
2015-10-15 10:42:26 +02:00
Andreas Schildbach
52b9623262
Wallet: Fix printing the same transaction twice when two pending transactions double spend each other are seen.
2015-10-14 15:56:25 +02:00
Andreas Schildbach
bb9c93c9b1
TestFeeLevel: Print the number of peers already connected.
2015-10-13 12:29:06 +02:00
Andreas Schildbach
91a49e66dd
TestFeeLevel: 50 connections can take too long to build these days, so halve that value. Should still be enough for transaction propagation.
2015-10-13 12:06:53 +02:00
Mike Hearn
761834bc18
Allow some monkey-patching of Peer methods/Peer creation.
...
Fix a bug in the min version required feature.
2015-10-08 19:15:07 +02:00