-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: README.md chain/chain.go cmd/dropwtxmgr/main.go config.go dcrwallet.go internal/legacy/keystore/keystore.go internal/legacy/keystore/keystore_test.go internal/legacy/rename/rename_unix.go internal/rpchelp/genrpcserverhelp.go internal/rpchelp/helpdescs_en_US.go internal/rpchelp/methods.go internal/zero/array.go internal/zero/benchmark_test.go internal/zero/slice.go internal/zero/slice14.go internal/zero/zero_test.go log.go netparams/params.go params.go rpc/documentation/README.md rpc/documentation/api.md rpc/legacyrpc/errors.go rpc/legacyrpc/methods.go rpc/legacyrpc/rpcserver_test.go rpc/legacyrpc/server.go rpcserver.go sample-dcrwallet.conf version.go votingpool/common_test.go votingpool/db.go votingpool/db_wb_test.go votingpool/doc.go votingpool/error.go votingpool/error_test.go votingpool/example_test.go votingpool/factory_test.go votingpool/input_selection_wb_test.go votingpool/internal_test.go votingpool/pool.go votingpool/pool_test.go votingpool/pool_wb_test.go votingpool/test_data_test.go votingpool/withdrawal.go votingpool/withdrawal_test.go votingpool/withdrawal_wb_test.go waddrmgr/address.go waddrmgr/common_test.go waddrmgr/db.go waddrmgr/doc.go waddrmgr/error.go waddrmgr/error_test.go waddrmgr/internal_test.go waddrmgr/manager.go waddrmgr/manager_test.go waddrmgr/sync.go wallet/chainntfns.go wallet/createtx.go wallet/createtx_test.go wallet/createtx_test_disabled.go wallet/doc.go wallet/loader.go wallet/notifications.go wallet/rescan.go wallet/wallet.go walletdb/bdb/db.go walletdb/bdb/doc.go walletdb/bdb/driver.go walletdb/bdb/driver_test.go walletdb/bdb/interface_test.go walletdb/db_test.go walletdb/doc.go walletdb/example_test.go walletdb/interface.go walletdb/interface_test.go walletsetup.go wtxmgr/db.go wtxmgr/doc.go wtxmgr/example_test.go wtxmgr/query.go wtxmgr/query_test.go wtxmgr/tx.go wtxmgr/tx_test.go wtxmgr/unconfirmed.go
- Loading branch information
Showing
110 changed files
with
1,890 additions
and
3,337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Copyright (c) 2013-2016 The btcsuite developers | ||
Copyright (c) 2015-2016 The Decred developers | ||
|
||
Permission to use, copy, modify, and distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) 2016 The btcsuite developers | ||
// Copyright (c) 2016 The Decred developers | ||
// Use of this source code is governed by an ISC | ||
// license that can be found in the LICENSE file. | ||
|
||
// Package helpers provides convenience functions to simplify wallet code. This | ||
// package is intended for internal wallet use only. | ||
package helpers | ||
|
||
import ( | ||
"github.com/decred/dcrd/wire" | ||
"github.com/decred/dcrutil" | ||
) | ||
|
||
func SumOutputValues(outputs []*wire.TxOut) (totalOutput dcrutil.Amount) { | ||
for _, txOut := range outputs { | ||
totalOutput += dcrutil.Amount(txOut.Value) | ||
} | ||
return totalOutput | ||
} | ||
|
||
func SumOutputSerializeSizes(outputs []*wire.TxOut) (serializeSize int) { | ||
for _, txOut := range outputs { | ||
serializeSize += txOut.SerializeSize() | ||
} | ||
return serializeSize | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.