Daniel Cousens
0a232cdb9d
tests: sign test needs to trigger ecurve.Point side effects
10 years ago
Daniel Cousens
c3f8869386
tests: Wallet test was not comprehensive
10 years ago
Daniel Cousens
69dfd3204d
Wallet: add missing variable wallet
10 years ago
Daniel Cousens
6e1517482b
tests: avoid use of deprecated APIs
11 years ago
Daniel Cousens
b727a65ea0
Wallet: refactor to use Array unspents solely, deprecating unspentsMap
11 years ago
Daniel Cousens
06f13db8d7
Wallet: rename outputs to unspentsMap
11 years ago
Daniel Cousens
02e71e430c
Wallet: revert 2f00c9a
11 years ago
Daniel Cousens
33955a7fb5
Wallet: store txHash, vout separately instead of "from: txid:vout"
11 years ago
Daniel Cousens
735feab7ba
Wallet: remove txId:index storage for spent outputs
11 years ago
Daniel Cousens
0f9674e65f
tests: code formatting
11 years ago
Daniel Cousens
82d8e20793
tests: avoid unnecessary .ok
11 years ago
Daniel Cousens
0782e8e837
tests: fixes test description typos
11 years ago
Daniel Cousens
26b028adcf
Wallet: use TxBuilder instead
11 years ago
Daniel Cousens
2f00c9ab35
Wallet: rework unspents to primarily work on initialization
The RegExp for the UTXO validation was removed as the errors are now
more verbose and specific to each case.
11 years ago
Daniel Cousens
7c22067f69
Wallet: clarify getPrivateKeyForAddress method structure
This does repeat the O(n) lookup several times, but that can be fixed by
using an O(1) lookup instead (and will be later).
Clarity first.
11 years ago
Daniel Cousens
eaf8cf85af
test: rephrase fail -> throw
11 years ago
Daniel Cousens
2920bb2ee1
tests: remove outdated FIXME in wallet
11 years ago
Wei Lu
f7af487597
wallet: reintroduce output.to to track pending spent utxo
11 years ago
Wei Lu
82b1d8fbdc
wallet: do not delete pending incoming tx from outputs
11 years ago
Wei Lu
79a17d67ec
wallet: do not overestimate fees when network has dustSoftThreshold
11 years ago
Wei Lu
7e31668b69
wallet: rename utxo.receive to utxo.from
11 years ago
Wei Lu
7e98123ccd
wallet.getUnspentOutputs includes the pending field
11 years ago
Wei Lu
79ec61d085
Fix bitcoin dustThreshold and feePerKb values
11 years ago
Daniel Cousens
c0e5393595
Transaction: remove .outpoint object
11 years ago
Daniel Cousens
569e0d4ff1
Wallet: fix processConfirmedTx tests
These tests were still passing despite being incorrect.
11 years ago
Daniel Cousens
f85792ba22
Transaction: remove address from txOut
11 years ago
Daniel Cousens
5551c38812
Transaction: use hash Buffer instead of hex string
11 years ago
Daniel Cousens
bdc7131d0e
Transaction: renames getHash to getId
In turn also removes the inherent calculation of tx.hash after deserialization.
11 years ago
Daniel Cousens
8b5647b0b9
Transaction: remove TxIn/TxOut exports
11 years ago
Daniel Cousens
07a0beee90
tests: remove unnecessary linebreaks
11 years ago
Daniel Cousens
7e5af52cd1
Transaction: mass rename from SPK/SS to Input/Output
I think it is important we maintain some reasoning that an Input script
is actually a script signature, but in the end, these names are more
coherent and understandable when reasoning with our code. So I think
its OK we break tradition with bitcoind.
11 years ago
Daniel Cousens
41c3b68293
templates: rename to scripts
11 years ago
Daniel Cousens
00cec9ce64
Script: move all templates to templates.js
11 years ago
Wei Lu
f53e35ed28
wallet: delete utxo instead of marking it as spend
11 years ago
Wei Lu
d265b53b03
wallet: processTx -> processConfirmedTx, processPendingTx
11 years ago
Wei Lu
e064e9d29d
wallet.createTx ignores pending utxo
11 years ago
Wei Lu
660c95483d
wallet.processTx accepts isPending flag and passes it on to output
11 years ago
Daniel Cousens
6a73bc02f5
HDNode: rename priv/pub to privKey/pubKey
11 years ago
Daniel Cousens
64e307b13f
HDWallet: rename to HDNode
11 years ago
Daniel Cousens
3bce535e36
Wallet: use assert for consistency
11 years ago
Daniel Cousens
cde285ccfc
Wallet: enforce operator new
11 years ago
Daniel Cousens
4952c5f4e7
HD/Wallet: use network objects, not strings
11 years ago
Daniel Cousens
2df790e2ab
Wallet: remove use of hashLittleEndian
11 years ago
Daniel Cousens
bd3690bdc0
Wallet: remove async interface
11 years ago
Daniel Cousens
50e9a09a8c
Wallet: cleanup createTx control flow
Unknowingly this also revealed a subtle bug in the previous
implementation which allowed the creation of transactions even
when no UTXOs existed.
11 years ago
Daniel Cousens
4dd617d5ca
wallet: fix address description typo
11 years ago
Daniel Cousens
8514bbfabd
Address: remove Address.Error
By removing Address.Error, we remove a code smell.
This part of the code base was also not under any form of test.
Test data and tests have therefore been added verifying its behaviour in
both Wallet and Address tests.
11 years ago
Daniel Cousens
0468c4710c
Transaction: rename (de)serialize to [to/from]Buffer
11 years ago
Daniel Cousens
6c0eebe94b
tests: use filepaths directly
After a long IRC discussion, it was decided that the use of direct
filepaths instead of the module is a more pure form of testing ,
although it may provide less overall coverage than the mixed integration
style imports used previously.
This will need to be remedied by further integration testing in
/test/integration.
11 years ago
Daniel Cousens
7a740c2e7b
tests: forces consistent import syntax
11 years ago