Braydon Fuller
eba7bbeddc
wallet: handle multiple conflicting inputs
2019-05-14 14:29:41 -07:00
Javed Khan
d53fa0a1c5
chain: extend try..finally; restore consts to copy
2019-05-07 03:59:15 +05:30
Javed Khan
49143b2c16
chain: reset consensus params on assert fail
2019-05-07 03:48:31 +05:30
Javed Khan
4bc0bb2366
chain: add fee overflow test; rename error
2019-05-07 03:27:42 +05:30
Braydon Fuller
b68207610c
blockchain: do not accept forked chain older than last checkpoint
...
This has been patched in both bitcoind and btcd around February 20th, 2014. It was
shortly followed by a headers-first synchronization of blocks.
- d8b4b49667
- 50b6e10b57
2019-05-02 14:44:10 -07:00
Braydon Fuller
54383578fb
test: configurable and unique test directory path
...
- Multiple parallel runs of the same test will not conflict
as a unique identifier is added to the test directory.
- The base test directory can be configured for various
environments, and can be changed via the environment
variable `TEMP`, see the implementation of `os.tmpdir()`
for specific details.
2019-04-11 10:15:51 -07:00
Braydon Fuller
50fe51ca32
blockstore: close file if write or read throws
2019-04-08 13:26:16 -07:00
Braydon Fuller
83824d73b1
blockstore: optimize block read and index
...
There is potential for around a 10% to 23% increase to the performance
of block reads by using `allocUnsafe`, however there is already around
a 3 to 6 times increase to the performance. While it's safe to use
`allocUnsafe` as the number of bytes read is checked to be the same
size as the buffer allocation, there is a potential for test cases
to introduce _other_ behavior for `fs.read` that may not have the
same behavior, though this isn't currently the case.
2019-04-08 13:20:00 -07:00
Braydon Fuller
f3e517c3c0
blockstore: fix logger, improve messages
2019-04-08 13:18:58 -07:00
Braydon Fuller
961f6eddb5
blockstore: index undo blocks from files
2019-04-08 13:18:57 -07:00
Braydon Fuller
8fc605c4a9
blockstore: index after write interrupt and use less memory
2019-04-08 13:18:57 -07:00
Braydon Fuller
5cbbcf5409
blockstore: do not write block twice
2019-04-08 13:18:57 -07:00
Braydon Fuller
58e623e30a
test: minor, cleanup and clarity
2019-04-08 13:18:56 -07:00
Braydon Fuller
747a8e707b
blockstore: tests and fixes for blockstore error cases
2019-04-08 13:18:56 -07:00
Braydon Fuller
0f0cb00c54
blockstore: minor, spelling
2019-04-08 13:18:56 -07:00
Braydon Fuller
89d3253f29
blockstore: add ensure method to create directories
2019-04-08 13:18:54 -07:00
Braydon Fuller
0b0dd58a91
node: add blockstore to full node
2019-04-08 13:18:54 -07:00
Braydon Fuller
3cec13ef5e
blockstore: add block data types with an undo type
2019-04-08 13:18:53 -07:00
Braydon Fuller
abd2ae4b5d
blockstore: prevent blocks writes at the same position
2019-04-08 13:18:53 -07:00
Braydon Fuller
2d08b296f7
blockstore: recover from block write interrupt
2019-04-08 13:18:52 -07:00
Braydon Fuller
8435a116f1
blockstore: add file block storage
2019-04-08 13:18:47 -07:00
Braydon Fuller
f57bd51187
Merge pull request #730 from tynes/document-bech32-tests
...
test: document bech32 test vectors
2019-04-05 09:48:29 -07:00
Braydon Fuller
392b3836fc
Merge pull request #715 from pinheadmz/inspect
...
Use custom `inspect` for all objects to avoid deprecation warning
2019-04-05 09:41:24 -07:00
Javed Khan
6a01409b79
Merge pull request #739 from pinheadmz/scan
...
node-http: require Bloom filter is loaded for `rescan` socket call
2019-04-02 18:55:53 +05:30
Matthew Zipkin
2980b4e739
http-test: socket rescan
2019-04-01 12:38:30 -07:00
Mark Tyneway
a28ffa272a
wallet rpc: add getaddressinfo rpc command
...
update the rpc command to better match bitcoind.
add the ismine and iswatchonly fields and
segwit related fields such as witness_version
and witness_program.
2019-03-26 16:13:18 -07:00
Mark Tyneway
26a2000b01
node rpc: update validateaddress
...
updates validateaddress to match the changes
in bitcoind https://github.com/bitcoin/bitcoin/pull/10583 .
removes the fields ismine and iswatchonly, those
are things that a wallet would know, not a node.
adds segwit related fields, witness_version and
witness_program. test changes to the node rpc method
validateaddress with p2pkh, p2sh, p2wpkh and p2wsh addresses
2019-03-26 16:03:23 -07:00
Mark Tyneway
9a56851e8d
test: document valid addresses
2019-03-20 11:37:16 -07:00
Mark Tyneway
10292b043d
test: document bech32 test vectors
...
adds additional information about the test vectors
pulled from https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
2019-03-15 16:43:50 -07:00
Braydon Fuller
2b2e53d83d
Merge pull request #550 from pinheadmz/rpcfixandtest
...
RPC: fix several wallet RPC calls and add RPC tests
2019-03-11 15:09:26 -07:00
Matthew Zipkin
5751b8c330
rpc: multiple fixes and tests
...
wallet-rpc: fix listsinceblock height
wdb: fix getWalletPaths() always return nothing
wallet: add unlockCoins() for lockunspent rpc
wallet-rpc: correct num args for some rpc calls
wallet-rpc: fix args for importwallet and importprunedfunds
wallet-rpc: importprunedfunds error misleading
wallet-rpc: importPubkey args
wallet-rpc: listsinceblock arg count error
wallet-rpc: listTransactions ignoring account param
wallet-rpc: better sendMany error msgs
wallet-rpc: sendMany subtractfee is bool not obj
wallet-rpc: dont check if not implemented
test: add rpc-test
2019-03-11 14:36:13 -07:00
Matthew Zipkin
df4e287817
utils: custom inspect for objects
2019-03-11 14:28:45 -07:00
Braydon Fuller
3ab296ce22
test: avoid port collision with a running regtest node
2019-03-06 16:55:43 -08:00
Nodar Chkuaselidze
c0fb984da6
wallet: create non-templated transaction.
2019-03-05 21:14:25 +04:00
Matthew Zipkin
e40e1c263c
wallet-test: missing output error
2019-03-01 10:50:14 -08:00
Braydon Fuller
ea1c6becb5
Merge pull request #700 pinheadmz/blockjson
...
block: inspect() expects buffer from getCommitmentHash()
2019-02-22 18:20:01 -08:00
Matthew Zipkin
67a258ea74
block: get wit-commit as buffer
2019-02-22 18:08:22 -08:00
Nodar Chkuaselidze
f0023cb489
test: mempool should reject non-standard p2sh
2019-02-14 23:47:19 +04:00
Braydon Fuller
bf32e86abe
test: independent watch-only tests and assert error
2019-02-11 14:31:05 -08:00
Matthew Zipkin
1696b3c7bb
wallet: require pubkey for watchonly
2019-02-11 14:14:33 -08:00
Javed Khan
7c64fd845c
Merge pull request #684 from braydonf/update-tests
...
Update transaction and script tests
2019-02-11 21:38:44 +05:30
Braydon Fuller
37fc9a78e4
script: update script tests and behavior
...
References:
- https://github.com/bitcoin/bitcoin/pull/12425
- https://github.com/bitcoin/bitcoin/pull/12167
- https://github.com/bitcoin/bitcoin/pull/10699
2019-02-01 16:32:39 -08:00
Braydon Fuller
efa78100e0
script: update tx standardness rules and more tx tests
...
References:
- https://github.com/bitcoin/bitcoin/pull/11423
- https://github.com/bitcoin/bitcoin/pull/12600
- https://github.com/bitcoin/bitcoin/pull/12082
Trivial References:
- https://github.com/bitcoin/bitcoin/pull/12393
- https://github.com/bitcoin/bitcoin/pull/6539
- https://github.com/bitcoin/bitcoin/pull/10742
- ecb11f561c
2019-02-01 16:32:31 -08:00
Node
d86033fa16
test: update licenses for test files
2019-02-01 16:24:45 -08:00
Braydon Fuller
fa877503a4
blockchain: enable segwit for regtest
2019-01-31 13:03:59 -08:00
Javed Khan
6f1a561db5
Merge pull request #641 from nodar-chkuaselidze/fix/mempool-index
...
mempool: reflect spent coins in mempool coinview.
2019-01-21 18:52:34 +05:30
Orfeas Litos
7a9023f388
Add test for KeyRing.fromMultisigScript()
2018-12-09 22:11:48 +00:00
Christopher Jeffrey
0b70a940a3
test: get tests passing in chrome.
2018-12-08 02:40:49 -08:00
Nodar Chkuaselidze
32cba1bf4a
mempool: reflect spent coins in mempool coinview.
...
Currently coinview does not account for spent coins in the mempool,
This does not create problems because we have additional checks in
right places which detect double spends, but technically
coinview should help you detect double spent in the mempool as well.
This way it will be compatible with chain.getCoinView.
getSpentView will still return all outputs that are available
in the mempool. (This could also return spentView from indexers if
available, this method is used by `signrawtransaction`.)
2018-11-25 23:32:13 +04:00
Matthew Zipkin
7d2caa072b
pool: fixes getBroadcasted() error
2018-08-31 09:30:40 -07:00