Commit graph

25 commits

Author SHA1 Message Date
Josh Rickmar 5140086f6e Use LICENSE file and short license headers. 2016-02-28 22:22:34 -05:00
Dave Collins 6ba74e6730 Update for hdkeychain NewMaster API change. 2015-11-10 12:05:16 -06:00
John C. Vernaleo cef002139f Fix wallet compile after SigCache addition to NewEngine. 2015-10-12 13:09:40 -04:00
Guilherme Salgado fe0f60991a Stop mocking global func() variables
Doing that may cause erratic test failures when we run them in parallel, so
move the functions the tests need to mock as struct fields that are not
shared across tests.
2015-05-14 21:49:09 +02:00
Guilherme Salgado 97e84fe212 Turn isTxTooBig into a method on withdrawalTx
Also get rid of the replaceIsTxTooBig test helper by making tests use
replaceCalculateTxSize instead
2015-05-14 21:48:01 +02:00
Josh Rickmar d714bf3310 Refactor wallet opening.
Rather than the main package being responsible for opening the address
and transaction managers, the namespaces of these components are
passed as parameters to the wallet.Open function.

Additionally, the address manager Options struct has been split into
two: ScryptOptions which holds the scrypt parameters needed during
passphrase key derivation, and OpenCallbacks which is only passed to
the Open function to allow the caller to provide additional details
during upgrades.

These changes are being done in preparation for a notification server
in the wallet package, with callbacks passed to the Open and Create
functions in waddrmgr and wtxmgr.  Before this could happen, the
wallet package had to be responsible for actually opening the managers
from their namespaces.
2015-05-14 14:33:33 -04:00
Guilherme Salgado 47ca1ca6e5 StartWithdrawal returns a previously saved WithdrawalStatus if parameters match
StartWithdrawal now persists the WithdrawalStatus before returning, and also
returns a previously saved one in subsequent calls with the same parameters.
2015-05-14 13:14:01 -05:00
Guilherme Salgado 49210dcf97 Change the stack semantics in withdrawal.eligibleInputs 2015-05-14 09:27:19 -05:00
Dave Collins c820c8a015 Relicense to the btcsuite developers. 2015-05-01 12:20:05 -05:00
Guilherme Salgado d050a32cb2 votingpool: API to store withdrawal txs in the txstore 2015-04-29 07:55:32 -03:00
Guilherme Salgado 847c7d8df9 Migrate votingpool tests to use wtxmgr 2015-04-28 17:30:17 -04:00
Javed Khan 48a3b413b4 Move txstore package to legacy directory 2015-04-20 18:20:19 -04:00
Josh Rickmar b74a6f78a6 Update for txscript.Script -> txscript.Engine. 2015-04-20 17:21:19 -04:00
Josh Rickmar 0d7b8af543 Updates for txscript.NewScript API change. 2015-04-20 16:52:26 -04:00
Dave Collins ab8a155841 Update for recent wire API hash error changes. 2015-04-17 01:41:25 -05:00
Guilherme Salgado 2181f4859d votingpool: implement Pool.StartWithdrawal()
<http://opentransactions.org/wiki/index.php/Voting_Pool_Withdrawal_Process>

Also includes some refactorings and other improvements, including better docs
and a new error type (votingpool.Error) used for all votingpool-specific
errors.
2015-04-01 15:55:42 +01:00
Josh Rickmar 4d9c43593d Consolidate and optimize zero functions.
This introduce a new internal package to deal with the explicit
clearing of data (such as private keys) in byte slices, byte arrays
(32 and 64-bytes long), and multi-precision "big" integers.

Benchmarks from a xeon e3 (Xor is the zeroing funcion which Bytes
replaces):

BenchmarkXor32  30000000                52.1 ns/op
BenchmarkXor64  20000000                91.5 ns/op
BenchmarkRange32        50000000                31.8 ns/op
BenchmarkRange64        30000000                49.5 ns/op
BenchmarkBytes32        200000000               10.1 ns/op
BenchmarkBytes64        100000000               15.4 ns/op
BenchmarkBytea32        1000000000               2.24 ns/op
BenchmarkBytea64        300000000                4.46 ns/op

Removes an XXX from the votingpool package.
2015-03-05 21:32:33 -05:00
Josh Rickmar ad80e9f384 Address several issues pointed out by lint and vet.
This brings the entire tree closer to but not 100% goclean.sh clean.
2015-02-06 01:04:01 -05:00
Dave Collins 4a1067b6f1 Update btcnet path import paths to new location. 2015-02-05 23:58:46 -06:00
Dave Collins 6d4889ffb0 Update btcscript import paths to new location. 2015-01-30 12:31:29 -06:00
Dave Collins f05ab25696 Update btcwallet import paths to new location. 2015-01-17 00:25:53 -06:00
Dave Collins 7276c1ca7d Update btcscript import paths to new location. 2015-01-16 19:38:15 -06:00
Dave Collins a26a65e2e0 Update btcnet import paths to new location. 2015-01-16 17:32:30 -06:00
Dave Collins afeb509c45 Update btcutil import paths to new location. 2015-01-15 10:48:58 -06:00
Guilherme Salgado 24dcd206d2 Implement the deposit side of Voting Pools
This contains the APIs to create and retrieve Voting Pools and Series (with
public/private keys) from a walletdb namespace, plus the generation of deposit
addresses (using m-of-n multi-sig P2SH scripts according to the series
configuration).
2014-11-12 11:41:44 -06:00