Commit Graph

337 Commits

Author SHA1 Message Date
Christopher Jeffrey (JJ)
a4858e274b Merge pull request #295 from Bucko13/segwit-keyring
pass options on keyring creation
2017-10-18 22:40:08 -07:00
Christopher Jeffrey (JJ)
e137288b78 Merge pull request #325 from sangaman/master
Adding confirmations property to block and tx getJSON
2017-10-18 13:17:17 -07:00
Daniel McNally
4f317992f5 Fixes to TX & Block confirmations property
TX `confirmations` property set to 0 for unconfirmed transactions. Block
`confirmations` property set to -1 for orphaned blocks. Fixing to add +1
to `confirmations` to match bitcoind behavior and corresponding bcoin
rpc  methods - block or tx at tip of main chain starts with 1
confirmation (not zero).
2017-10-02 00:58:48 -07:00
Daniel McNally
c2cef86296 Adding 'confirmations' property to block getJSON
Adds a 'confirmations' property to the JSON returned by `cli tx [hash]`
as well as the Rest `/tx/:hash` call by subtracting block height from
chain height
2017-09-28 23:41:13 -04:00
Daniel McNally
0f68427778 Adding 'confirmations' property to TX getJSON
Adds a 'confirmations' property to the JSON returned by cli tx [hash] as
well as the REST '/tx/:hash' call by subtracting TX height from chain
height
2017-09-28 22:47:50 -04:00
Christopher Jeffrey
459a9f25f4
chain/mempool: optimize coinview handling. fix mempool orphan edge case. 2017-09-26 13:07:01 -07:00
Christopher Jeffrey
a543648310
writer: use 100kb pool for sighashing. 2017-09-03 00:05:47 -07:00
Christopher Jeffrey
e0eb1cdbe3
refactor: remove all duck typing. 2017-09-02 21:29:38 -07:00
Christopher Jeffrey
ad4c7e81c8
tx: minor. 2017-09-01 18:05:50 -07:00
Christopher Jeffrey
57b98b2368
tx: refactor hasStandardWitness. 2017-08-30 10:14:51 -07:00
Christopher Jeffrey
063f55f448
script: remove instances of script.getSmall(). 2017-08-30 10:07:07 -07:00
Christopher Jeffrey
7022c6649f
tx: minor. 2017-08-28 06:08:50 -07:00
Christopher Jeffrey
b87f557823
tx/script/chain: refactor locktime handling. 2017-08-27 19:07:57 -07:00
Christopher Jeffrey
9d48c1385b
mtx: rename subtractFee to subtractIndex. 2017-08-26 12:37:08 -07:00
Christopher Jeffrey
6742482445
mtx: subtract fee evenly from all outputs. 2017-08-26 01:21:25 -07:00
Christopher Jeffrey
c6b76ec73f
Revert "wallet/mtx: add extraOutputs option."
This reverts commit 3957f83a59.
2017-08-26 00:13:24 -07:00
Christopher Jeffrey
3957f83a59
wallet/mtx: add extraOutputs option. 2017-08-25 15:10:30 -07:00
Christopher Jeffrey
13892b3b38
encoding: rename written to offset. 2017-08-24 22:36:59 -07:00
Christopher Jeffrey
d6ce66bce9
script: refactor script and stack mutation.
This allows more reasonable signing behavior and eliminates all polymorphism.
2017-08-24 17:34:20 -07:00
Bucko
ed4e7b1243 pass options on keyring creation 2017-08-24 17:19:05 -07:00
Christopher Jeffrey
8f73ec53e9
refactor: use assert.strictEqual instead of assert.equal. 2017-08-09 15:40:39 -07:00
Christopher Jeffrey
a5b736b3f5
mtx: expose commit method returning a tx and view. 2017-08-09 15:26:33 -07:00
Christopher Jeffrey
ff8b0418b1
keyring: minor. 2017-08-09 15:25:46 -07:00
Christopher Jeffrey
edebc51d18
primitives: use equals instead of equal for consistency. 2017-08-09 15:25:01 -07:00
Christopher Jeffrey
de9f37b290
merkleblock: minor. style. 2017-08-08 14:31:42 -07:00
Christopher Jeffrey
36523e2f56
tx: do not track flags byte. 2017-08-07 00:55:26 -07:00
Christopher Jeffrey
3bc47f5a3c
lint: enforce function names. 2017-08-06 21:36:48 -07:00
Christopher Jeffrey
62152a1005
util: remove util.inherits. inline inheritance. 2017-08-06 19:45:10 -07:00
Christopher Jeffrey
4ce070fad4
validation: use stricter validation for ints. 2017-08-06 14:43:22 -07:00
Christopher Jeffrey
a290e6880d
encoding: rename read int methods to readIx. 2017-08-06 03:27:06 -07:00
Christopher Jeffrey
1df577cb74
validation: refactor. 2017-08-06 03:23:37 -07:00
Christopher Jeffrey
faabd36f9e
config/validator/utils: fix fixed parsing/serialization. 2017-08-05 18:52:24 -07:00
Christopher Jeffrey
cfd1715c9f
primitives: show hex on json. 2017-08-03 19:38:43 -07:00
Christopher Jeffrey
88ef28d837
lint: no implicit casting. 2017-07-31 18:21:03 -07:00
Christopher Jeffrey
5eb6620431
lint: consistent return values. 2017-07-31 18:21:03 -07:00
Christopher Jeffrey
5e73e51177
lint: fix function names. 2017-07-31 18:21:03 -07:00
Christopher Jeffrey
55cf07a871
refactor: style for const/let and returns. 2017-07-31 18:21:02 -07:00
Christopher Jeffrey
6f3988e861
refactor: use const as much as possible. 2017-07-31 18:21:02 -07:00
Christopher Jeffrey
9cc5c393b4
eslint: use prefer-const. 2017-07-31 18:21:02 -07:00
Christopher Jeffrey
492c05c378
coinview: refactor api. 2017-07-31 18:20:48 -07:00
Christopher Jeffrey
a1af3ab980
chaindb: switch to pertxout. 2017-07-31 18:20:47 -07:00
Christopher Jeffrey
396ba5ee5f
mtx: minor. 2017-07-31 18:20:47 -07:00
Christopher Jeffrey
8036c301a1
address: fix isMixedCase. 2017-07-25 16:48:30 -07:00
Christopher Jeffrey
9a2d39c751
address: minor var name change. 2017-07-25 16:38:12 -07:00
Christopher Jeffrey
957c4e8c93
network/address: remove segnet4 support. fix bech32 parsing. 2017-07-25 16:31:27 -07:00
Christopher Jeffrey
87d664784c
refactor: s/ts/time. s/ps/mtime. 2017-07-25 14:23:10 -07:00
Christopher Jeffrey
6f1f81dcbe
refactor: lint. 2017-07-25 11:21:43 -07:00
Christopher Jeffrey
7eefb773be
refactor: use maps and sets wherever possible. 2017-07-25 05:15:47 -07:00
Christopher Jeffrey
1e9855a4fa
block/tx: refactor size calculation. 2017-07-25 02:12:35 -07:00
Christopher Jeffrey
0993bbacbf
memblock: fix isMemBlock. 2017-07-25 01:57:46 -07:00
Christopher Jeffrey
cd795cf96f
block: remove addTX. 2017-07-25 01:53:58 -07:00
Christopher Jeffrey
8c212d797f
block: rename some more methods. refactor bip152 ptx vector. 2017-07-25 01:16:25 -07:00
Christopher Jeffrey
7ed36ec2ba
block: rename "abbr" methods to "head". 2017-07-25 00:08:28 -07:00
Christopher Jeffrey
a915545a1a
block: minor. 2017-07-20 14:28:47 -07:00
Christopher Jeffrey
7ef658049c
block: minor. 2017-07-20 01:56:06 -07:00
Christopher Jeffrey
498264b417
workers: better errors for verification. 2017-07-17 14:26:43 -07:00
Christopher Jeffrey
053561f2ba
errors: fix stack traces. 2017-07-17 14:26:43 -07:00
Christopher Jeffrey
37da047a34
digest: avoid extra allocations. 2017-07-17 14:26:43 -07:00
Christopher Jeffrey
2f51fd1c50
api: use satoshi values for everything. 2017-07-17 14:26:43 -07:00
Christopher Jeffrey
47adb5a5a7
tx: refactor sighashing and hasStandardWitness. 2017-07-17 14:26:43 -07:00
Christopher Jeffrey
3f3516ca18
coinview: remove old serialization methods. 2017-07-17 14:26:39 -07:00
Christopher Jeffrey
15d0b88308
bip152/merkleblock: use Map objects. 2017-07-17 14:26:39 -07:00
Christopher Jeffrey
296e65d0fd
refactor: use es6 template strings everywhere. 2017-07-17 14:26:39 -07:00
Christopher Jeffrey
3af014119a
refactor: switch to template strings for errors. 2017-07-17 14:26:38 -07:00
Christopher Jeffrey
7932a25abe
mtx: fix verify methods. 2017-07-17 14:26:38 -07:00
Christopher Jeffrey
10672784e5
refactor: rename tx functions. more es6 features. 2017-07-17 14:26:38 -07:00
Christopher Jeffrey
3e7c921ad3
tx: minor. 2017-07-17 14:26:38 -07:00
Christopher Jeffrey
8c7279518f
refactor: de-globalize workerpool. 2017-07-17 14:26:38 -07:00
Christopher Jeffrey
c53f4cf89e
refactor: switch to const/let. 2017-07-17 14:26:37 -07:00
Christopher Jeffrey
e00472891d
refactor: start using for...of. 2017-07-17 14:26:37 -07:00
Christopher Jeffrey
78d62c73b8
refactor: start using multiple return values. 2017-07-17 14:26:37 -07:00
Christopher Jeffrey
62e7f97359
refactor: module index. 2017-06-27 09:28:18 -07:00
Christopher Jeffrey
d4cc22e1c5
refactor: crypto. 2017-06-27 07:27:53 -07:00
Christopher Jeffrey
fa3e98b274
crypto: rename ec to secp256k1. 2017-06-27 02:48:19 -07:00
Christopher Jeffrey
2ef4d137e6
pkg: switch from jshint to eslint. 2017-06-24 04:45:46 -07:00
Christopher Jeffrey
84eccc29fa
refactor: switch to async/await. see #227. 2017-06-24 02:39:06 -07:00
Christopher Jeffrey
ea26a0e70a
tx: minor. 2017-06-15 22:34:56 -07:00
Christopher Jeffrey
2b569883bf
refactor: lint. 2017-06-14 20:32:11 -07:00
Christopher Jeffrey
8593bd9410
script: less static methods. 2017-06-13 18:45:42 -07:00
Christopher Jeffrey
a3c7a49c80
refactor: replace util.equal with Buffer#equals. 2017-06-12 03:00:08 -07:00
Christopher Jeffrey
8893131e08
script: move static methods off of script constructor. 2017-06-10 01:20:05 -07:00
Christopher Jeffrey
28cd43045d
refactor: avoid using new Buffer() due to its new perf implications. 2017-05-30 21:11:10 -07:00
Christopher Jeffrey
46b34677f1
address/wallet: refactor usage of Address.getHash. 2017-05-25 23:27:37 -07:00
Christopher Jeffrey
18cadc7803
address: minor fixes. 2017-05-14 15:45:17 -07:00
Christopher Jeffrey
4812cc8ddb
address: minor. 2017-05-14 15:33:48 -07:00
Christopher Jeffrey
11a660aeab
network: add more helper functions. 2017-05-13 21:35:58 -07:00
Christopher Jeffrey
fa5f987775
address: fix bech32 hrp check. 2017-05-13 18:57:40 -07:00
Christopher Jeffrey
e55ca1eb3d
address: sanity checks. 2017-05-13 17:22:32 -07:00
Christopher Jeffrey
44f6dd9386
address: lint. 2017-05-13 15:23:20 -07:00
Christopher Jeffrey
a9ea4e5531
bech32: refactor. 2017-05-13 15:13:42 -07:00
Christopher Jeffrey
b790dfea6d
merkleblock: remove useless method. 2017-05-13 03:52:58 -07:00
Christopher Jeffrey
5915338407
address: improve isNull. 2017-05-13 00:34:01 -07:00
Christopher Jeffrey
41d9493cc7
minor: lint. 2017-05-13 00:31:18 -07:00
Christopher Jeffrey
0ea341772c
address: make bech32 addrs more sane. 2017-05-13 00:21:51 -07:00
Christopher Jeffrey (JJ)
724e60970a Merge pull request #183 from murtyjones/patch-1
[Trivial] Adds JSHint param name
2017-05-12 13:35:41 -07:00
Christopher Jeffrey
3ca70a152a
block: remove coinbase from json output. 2017-05-12 11:45:30 -07:00
Christopher Jeffrey (JJ)
27b896a4ed Merge pull request #211 from pinheadmz/cbtxt
return coinbase scriptSig string in getblock requests
2017-05-12 10:48:21 -07:00
Matthew Zipkin
6a332bfeaf init return cb rpc 2017-05-05 20:51:57 +00:00
Christopher Jeffrey
ed4400acb9
address: start using from/toString. 2017-04-30 07:13:36 -07:00
Christopher Jeffrey
14ee1f8f03
address: expose bech32. 2017-04-30 06:42:21 -07:00