From e72f99ac3fa27caf8d8a754bf8761e5b67bb1b96 Mon Sep 17 00:00:00 2001 From: Brannon King Date: Fri, 10 Sep 2021 16:30:39 -0400 Subject: [PATCH] renamed package to lbcutil, updated refs to it --- .github/workflows/go.yml | 8 +- README.md | 44 +-- address.go | 10 +- address_test.go | 216 ++++++------- amount.go | 18 +- amount_test.go | 26 +- appdata.go | 2 +- appdata_test.go | 6 +- base58/README.md | 23 +- base58/base58_test.go | 2 +- base58/base58bench_test.go | 2 +- base58/base58check_test.go | 2 +- base58/example_test.go | 2 +- bech32/README.md | 17 +- bech32/example_test.go | 2 +- block.go | 12 +- block_test.go | 40 +-- bloom/README.md | 17 +- bloom/example_test.go | 6 +- bloom/filter.go | 12 +- bloom/filter_test.go | 18 +- bloom/merkleblock.go | 10 +- bloom/merkleblock_test.go | 10 +- bloom/murmurhash3_test.go | 2 +- bloom/test_coverage.txt | 52 ++-- certgen.go | 2 +- certgen_test.go | 6 +- coinset/README.md | 15 +- coinset/coins.go | 40 +-- coinset/coins_test.go | 20 +- coinset/test_coverage.txt | 58 ++-- const.go | 2 +- doc.go | 6 +- example_test.go | 28 +- gcs/README.md | 19 +- gcs/builder/builder.go | 8 +- gcs/builder/builder_test.go | 18 +- gcs/gcs.go | 2 +- gcs/gcs_test.go | 2 +- gcs/gcsbench_test.go | 2 +- go.mod | 13 +- go.sum | 539 +++++++++++++++++++++++++++++++-- hash160.go | 2 +- hdkeychain/README.md | 23 +- hdkeychain/bench_test.go | 2 +- hdkeychain/example_test.go | 4 +- hdkeychain/extendedkey.go | 20 +- hdkeychain/extendedkey_test.go | 4 +- hdkeychain/test_coverage.txt | 36 +-- internal_test.go | 12 +- net.go | 2 +- net_noop.go | 2 +- psbt/creator.go | 2 +- psbt/extractor.go | 4 +- psbt/finalizer.go | 2 +- psbt/go.mod | 6 +- psbt/go.sum | 12 +- psbt/partial_input.go | 4 +- psbt/partial_output.go | 2 +- psbt/partialsig.go | 2 +- psbt/profile.cov | 1 + psbt/psbt.go | 2 +- psbt/psbt_test.go | 10 +- psbt/signer.go | 2 +- psbt/sort.go | 4 +- psbt/sort_test.go | 4 +- psbt/updater.go | 12 +- psbt/utils.go | 4 +- psbt/utils_test.go | 4 +- test_coverage.txt | 72 ----- tx.go | 6 +- tx_test.go | 20 +- txsort/README.md | 15 +- txsort/txsort.go | 6 +- txsort/txsort_test.go | 4 +- wif.go | 10 +- wif_test.go | 8 +- 77 files changed, 978 insertions(+), 686 deletions(-) create mode 100644 psbt/profile.cov delete mode 100644 test_coverage.txt diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d82b525..08f0e3a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [1.14, 1.15] + go: [1.16] steps: - name: Set up Go uses: actions/setup-go@v2 @@ -17,15 +17,11 @@ jobs: - name: Install Linters run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.31.0" - name: Build - env: - GO111MODULE: "on" run: go build ./... - name: Test - env: - GO111MODULE: "on" run: | sh ./goclean.sh - - name: Send btcutil coverage + - name: Send lbcutil coverage uses: shogo82148/actions-goveralls@v1 with: path-to-profile: profile.cov diff --git a/README.md b/README.md index fffb0f7..b1956b9 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,11 @@ -btcutil +lbcutil ======= -[![Build Status](https://github.com/btcsuite/btcutil/workflows/Build%20and%20Test/badge.svg)](https://github.com/btcsuite/btcutil/actions) [![ISC License](https://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/btcsuite/btcutil) - -Package btcutil provides bitcoin-specific convenience functions and types. -A comprehensive suite of tests is provided to ensure proper functionality. See -`test_coverage.txt` for the gocov coverage report. Alternatively, if you are -running a POSIX OS, you can run the `cov_report.sh` script for a real-time -report. +Package lbcutil provides convenience functions and types. This package was developed for btcd, an alternative full-node implementation of bitcoin which is under active development by Conformal. Although it was primarily written for btcd, this package has intentionally been designed so it can be used as a standalone package for any projects needing the functionality -provided. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil -``` - -## GPG Verification Key - -All official release tags are signed by Conformal so users can ensure the code -has not been tampered with and is coming from the btcsuite developers. To -verify the signature perform the following: - -- Download the public key from the Conformal website at - https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt - -- Import the public key into your GPG keyring: - ```bash - gpg --import GIT-GPG-KEY-conformal.txt - ``` - -- Verify the release tag with the following command where `TAG_NAME` is a - placeholder for the specific tag: - ```bash - git tag -v TAG_NAME - ``` - -## License - -Package btcutil is licensed under the [copyfree](http://copyfree.org) ISC -License. +provided. It has been modified to support lbcd. \ No newline at end of file diff --git a/address.go b/address.go index 8672497..a97e9a5 100644 --- a/address.go +++ b/address.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "bytes" @@ -11,10 +11,10 @@ import ( "fmt" "strings" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcutil/base58" - "github.com/btcsuite/btcutil/bech32" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcutil/base58" + "github.com/lbryio/lbcutil/bech32" "golang.org/x/crypto/ripemd160" ) diff --git a/address_test.go b/address_test.go index b6a990d..67944b0 100644 --- a/address_test.go +++ b/address_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil_test +package lbcutil_test import ( "bytes" @@ -12,9 +12,9 @@ import ( "strings" "testing" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" "golang.org/x/crypto/ripemd160" ) @@ -50,8 +50,8 @@ func TestAddresses(t *testing.T) { addr string encoded string valid bool - result btcutil.Address - f func() (btcutil.Address, error) + result lbcutil.Address + f func() (lbcutil.Address, error) net *chaincfg.Params }{ // Positive P2PKH tests. @@ -60,16 +60,16 @@ func TestAddresses(t *testing.T) { addr: "1MirQ9bwyQcGVJPwKUgapu5ouK2E2Ey4gX", encoded: "1MirQ9bwyQcGVJPwKUgapu5ouK2E2Ey4gX", valid: true, - result: btcutil.TstAddressPubKeyHash( + result: lbcutil.TstAddressPubKeyHash( [ripemd160.Size]byte{ 0xe3, 0x4c, 0xce, 0x70, 0xc8, 0x63, 0x73, 0x27, 0x3e, 0xfc, 0xc5, 0x4c, 0xe7, 0xd2, 0xa4, 0x91, 0xbb, 0x4a, 0x0e, 0x84}, chaincfg.MainNetParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0xe3, 0x4c, 0xce, 0x70, 0xc8, 0x63, 0x73, 0x27, 0x3e, 0xfc, 0xc5, 0x4c, 0xe7, 0xd2, 0xa4, 0x91, 0xbb, 0x4a, 0x0e, 0x84} - return btcutil.NewAddressPubKeyHash(pkHash, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKeyHash(pkHash, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -78,16 +78,16 @@ func TestAddresses(t *testing.T) { addr: "12MzCDwodF9G1e7jfwLXfR164RNtx4BRVG", encoded: "12MzCDwodF9G1e7jfwLXfR164RNtx4BRVG", valid: true, - result: btcutil.TstAddressPubKeyHash( + result: lbcutil.TstAddressPubKeyHash( [ripemd160.Size]byte{ 0x0e, 0xf0, 0x30, 0x10, 0x7f, 0xd2, 0x6e, 0x0b, 0x6b, 0xf4, 0x05, 0x12, 0xbc, 0xa2, 0xce, 0xb1, 0xdd, 0x80, 0xad, 0xaa}, chaincfg.MainNetParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0x0e, 0xf0, 0x30, 0x10, 0x7f, 0xd2, 0x6e, 0x0b, 0x6b, 0xf4, 0x05, 0x12, 0xbc, 0xa2, 0xce, 0xb1, 0xdd, 0x80, 0xad, 0xaa} - return btcutil.NewAddressPubKeyHash(pkHash, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKeyHash(pkHash, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -96,16 +96,16 @@ func TestAddresses(t *testing.T) { addr: "LM2WMpR1Rp6j3Sa59cMXMs1SPzj9eXpGc1", encoded: "LM2WMpR1Rp6j3Sa59cMXMs1SPzj9eXpGc1", valid: true, - result: btcutil.TstAddressPubKeyHash( + result: lbcutil.TstAddressPubKeyHash( [ripemd160.Size]byte{ 0x13, 0xc6, 0x0d, 0x8e, 0x68, 0xd7, 0x34, 0x9f, 0x5b, 0x4c, 0xa3, 0x62, 0xc3, 0x95, 0x4b, 0x15, 0x04, 0x50, 0x61, 0xb1}, CustomParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0x13, 0xc6, 0x0d, 0x8e, 0x68, 0xd7, 0x34, 0x9f, 0x5b, 0x4c, 0xa3, 0x62, 0xc3, 0x95, 0x4b, 0x15, 0x04, 0x50, 0x61, 0xb1} - return btcutil.NewAddressPubKeyHash(pkHash, &customParams) + return lbcutil.NewAddressPubKeyHash(pkHash, &customParams) }, net: &customParams, }, @@ -114,16 +114,16 @@ func TestAddresses(t *testing.T) { addr: "mrX9vMRYLfVy1BnZbc5gZjuyaqH3ZW2ZHz", encoded: "mrX9vMRYLfVy1BnZbc5gZjuyaqH3ZW2ZHz", valid: true, - result: btcutil.TstAddressPubKeyHash( + result: lbcutil.TstAddressPubKeyHash( [ripemd160.Size]byte{ 0x78, 0xb3, 0x16, 0xa0, 0x86, 0x47, 0xd5, 0xb7, 0x72, 0x83, 0xe5, 0x12, 0xd3, 0x60, 0x3f, 0x1f, 0x1c, 0x8d, 0xe6, 0x8f}, chaincfg.TestNet3Params.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0x78, 0xb3, 0x16, 0xa0, 0x86, 0x47, 0xd5, 0xb7, 0x72, 0x83, 0xe5, 0x12, 0xd3, 0x60, 0x3f, 0x1f, 0x1c, 0x8d, 0xe6, 0x8f} - return btcutil.NewAddressPubKeyHash(pkHash, &chaincfg.TestNet3Params) + return lbcutil.NewAddressPubKeyHash(pkHash, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -133,12 +133,12 @@ func TestAddresses(t *testing.T) { name: "p2pkh wrong hash length", addr: "", valid: false, - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0x00, 0x0e, 0xf0, 0x30, 0x10, 0x7f, 0xd2, 0x6e, 0x0b, 0x6b, 0xf4, 0x05, 0x12, 0xbc, 0xa2, 0xce, 0xb1, 0xdd, 0x80, 0xad, 0xaa} - return btcutil.NewAddressPubKeyHash(pkHash, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKeyHash(pkHash, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -158,12 +158,12 @@ func TestAddresses(t *testing.T) { addr: "3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC", encoded: "3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC", valid: true, - result: btcutil.TstAddressScriptHash( + result: lbcutil.TstAddressScriptHash( [ripemd160.Size]byte{ 0xf8, 0x15, 0xb0, 0x36, 0xd9, 0xbb, 0xbc, 0xe5, 0xe9, 0xf2, 0xa0, 0x0a, 0xbd, 0x1b, 0xf3, 0xdc, 0x91, 0xe9, 0x55, 0x10}, chaincfg.MainNetParams.ScriptHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { script := []byte{ 0x52, 0x41, 0x04, 0x91, 0xbb, 0xa2, 0x51, 0x09, 0x12, 0xa5, 0xbd, 0x37, 0xda, 0x1f, 0xb5, 0xb1, 0x67, 0x30, 0x10, 0xe4, @@ -186,7 +186,7 @@ func TestAddresses(t *testing.T) { 0xdb, 0xfb, 0x1e, 0x75, 0x4e, 0x35, 0xfa, 0x1c, 0x78, 0x44, 0xc4, 0x1f, 0x32, 0x2a, 0x18, 0x63, 0xd4, 0x62, 0x13, 0x53, 0xae} - return btcutil.NewAddressScriptHash(script, &chaincfg.MainNetParams) + return lbcutil.NewAddressScriptHash(script, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -195,16 +195,16 @@ func TestAddresses(t *testing.T) { addr: "MVcg9uEvtWuP5N6V48EHfEtbz48qR8TKZ9", encoded: "MVcg9uEvtWuP5N6V48EHfEtbz48qR8TKZ9", valid: true, - result: btcutil.TstAddressScriptHash( + result: lbcutil.TstAddressScriptHash( [ripemd160.Size]byte{ 0xee, 0x34, 0xac, 0x67, 0x6b, 0xda, 0xf6, 0xe3, 0x70, 0xc8, 0xc8, 0x20, 0xb9, 0x48, 0xed, 0xfa, 0xd3, 0xa8, 0x73, 0xd8}, CustomParams.ScriptHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0xEE, 0x34, 0xAC, 0x67, 0x6B, 0xDA, 0xF6, 0xE3, 0x70, 0xC8, 0xC8, 0x20, 0xB9, 0x48, 0xED, 0xFA, 0xD3, 0xA8, 0x73, 0xD8} - return btcutil.NewAddressScriptHashFromHash(pkHash, &customParams) + return lbcutil.NewAddressScriptHashFromHash(pkHash, &customParams) }, net: &customParams, }, @@ -216,16 +216,16 @@ func TestAddresses(t *testing.T) { addr: "3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8", encoded: "3NukJ6fYZJ5Kk8bPjycAnruZkE5Q7UW7i8", valid: true, - result: btcutil.TstAddressScriptHash( + result: lbcutil.TstAddressScriptHash( [ripemd160.Size]byte{ 0xe8, 0xc3, 0x00, 0xc8, 0x79, 0x86, 0xef, 0xa8, 0x4c, 0x37, 0xc0, 0x51, 0x99, 0x29, 0x01, 0x9e, 0xf8, 0x6e, 0xb5, 0xb4}, chaincfg.MainNetParams.ScriptHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { hash := []byte{ 0xe8, 0xc3, 0x00, 0xc8, 0x79, 0x86, 0xef, 0xa8, 0x4c, 0x37, 0xc0, 0x51, 0x99, 0x29, 0x01, 0x9e, 0xf8, 0x6e, 0xb5, 0xb4} - return btcutil.NewAddressScriptHashFromHash(hash, &chaincfg.MainNetParams) + return lbcutil.NewAddressScriptHashFromHash(hash, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -235,16 +235,16 @@ func TestAddresses(t *testing.T) { addr: "2NBFNJTktNa7GZusGbDbGKRZTxdK9VVez3n", encoded: "2NBFNJTktNa7GZusGbDbGKRZTxdK9VVez3n", valid: true, - result: btcutil.TstAddressScriptHash( + result: lbcutil.TstAddressScriptHash( [ripemd160.Size]byte{ 0xc5, 0x79, 0x34, 0x2c, 0x2c, 0x4c, 0x92, 0x20, 0x20, 0x5e, 0x2c, 0xdc, 0x28, 0x56, 0x17, 0x04, 0x0c, 0x92, 0x4a, 0x0a}, chaincfg.TestNet3Params.ScriptHashAddrID), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { hash := []byte{ 0xc5, 0x79, 0x34, 0x2c, 0x2c, 0x4c, 0x92, 0x20, 0x20, 0x5e, 0x2c, 0xdc, 0x28, 0x56, 0x17, 0x04, 0x0c, 0x92, 0x4a, 0x0a} - return btcutil.NewAddressScriptHashFromHash(hash, &chaincfg.TestNet3Params) + return lbcutil.NewAddressScriptHashFromHash(hash, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -254,12 +254,12 @@ func TestAddresses(t *testing.T) { name: "p2sh wrong hash length", addr: "", valid: false, - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { hash := []byte{ 0x00, 0xf8, 0x15, 0xb0, 0x36, 0xd9, 0xbb, 0xbc, 0xe5, 0xe9, 0xf2, 0xa0, 0x0a, 0xbd, 0x1b, 0xf3, 0xdc, 0x91, 0xe9, 0x55, 0x10} - return btcutil.NewAddressScriptHashFromHash(hash, &chaincfg.MainNetParams) + return lbcutil.NewAddressScriptHashFromHash(hash, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -270,20 +270,20 @@ func TestAddresses(t *testing.T) { addr: "02192d74d0cb94344c9569c2e77901573d8d7903c3ebec3a957724895dca52c6b4", encoded: "13CG6SJ3yHUXo4Cr2RY4THLLJrNFuG3gUg", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, 0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24, 0x89, 0x5d, 0xca, 0x52, 0xc6, 0xb4}, - btcutil.PKFCompressed, chaincfg.MainNetParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFCompressed, chaincfg.MainNetParams.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, 0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24, 0x89, 0x5d, 0xca, 0x52, 0xc6, 0xb4} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -292,20 +292,20 @@ func TestAddresses(t *testing.T) { addr: "03b0bd634234abbb1ba1e986e884185c61cf43e001f9137f23c2c409273eb16e65", encoded: "15sHANNUBSh6nDp8XkDPmQcW6n3EFwmvE6", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x03, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, 0x01, 0xf9, 0x13, 0x7f, 0x23, 0xc2, 0xc4, 0x09, 0x27, 0x3e, 0xb1, 0x6e, 0x65}, - btcutil.PKFCompressed, chaincfg.MainNetParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFCompressed, chaincfg.MainNetParams.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x03, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, 0x01, 0xf9, 0x13, 0x7f, 0x23, 0xc2, 0xc4, 0x09, 0x27, 0x3e, 0xb1, 0x6e, 0x65} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -315,7 +315,7 @@ func TestAddresses(t *testing.T) { "e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3", encoded: "12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x04, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a, 0x01, 0x6b, 0x49, 0x84, 0x0f, 0x8c, 0x53, 0xbc, 0x1e, 0xb6, 0x8a, 0x38, @@ -324,8 +324,8 @@ func TestAddresses(t *testing.T) { 0xf9, 0x74, 0x44, 0x64, 0xf8, 0x2e, 0x16, 0x0b, 0xfa, 0x9b, 0x8b, 0x64, 0xf9, 0xd4, 0xc0, 0x3f, 0x99, 0x9b, 0x86, 0x43, 0xf6, 0x56, 0xb4, 0x12, 0xa3}, - btcutil.PKFUncompressed, chaincfg.MainNetParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFUncompressed, chaincfg.MainNetParams.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x04, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a, 0x01, 0x6b, 0x49, 0x84, 0x0f, 0x8c, 0x53, 0xbc, 0x1e, 0xb6, 0x8a, 0x38, @@ -334,7 +334,7 @@ func TestAddresses(t *testing.T) { 0xf9, 0x74, 0x44, 0x64, 0xf8, 0x2e, 0x16, 0x0b, 0xfa, 0x9b, 0x8b, 0x64, 0xf9, 0xd4, 0xc0, 0x3f, 0x99, 0x9b, 0x86, 0x43, 0xf6, 0x56, 0xb4, 0x12, 0xa3} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -344,7 +344,7 @@ func TestAddresses(t *testing.T) { "0d45264838c0bd96852662ce6a847b197376830160c6d2eb5e6a4c44d33f453e", encoded: "1Ja5rs7XBZnK88EuLVcFqYGMEbBitzchmX", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x06, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, @@ -353,8 +353,8 @@ func TestAddresses(t *testing.T) { 0x96, 0x85, 0x26, 0x62, 0xce, 0x6a, 0x84, 0x7b, 0x19, 0x73, 0x76, 0x83, 0x01, 0x60, 0xc6, 0xd2, 0xeb, 0x5e, 0x6a, 0x4c, 0x44, 0xd3, 0x3f, 0x45, 0x3e}, - btcutil.PKFHybrid, chaincfg.MainNetParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFHybrid, chaincfg.MainNetParams.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x06, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, @@ -363,7 +363,7 @@ func TestAddresses(t *testing.T) { 0x96, 0x85, 0x26, 0x62, 0xce, 0x6a, 0x84, 0x7b, 0x19, 0x73, 0x76, 0x83, 0x01, 0x60, 0xc6, 0xd2, 0xeb, 0x5e, 0x6a, 0x4c, 0x44, 0xd3, 0x3f, 0x45, 0x3e} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -373,7 +373,7 @@ func TestAddresses(t *testing.T) { "37a576782eba668a7ef8bd3b3cfb1edb7117ab65129b8a2e681f3c1e0908ef7b", encoded: "1ExqMmf6yMxcBMzHjbj41wbqYuqoX6uBLG", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x07, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, @@ -382,8 +382,8 @@ func TestAddresses(t *testing.T) { 0x8a, 0x7e, 0xf8, 0xbd, 0x3b, 0x3c, 0xfb, 0x1e, 0xdb, 0x71, 0x17, 0xab, 0x65, 0x12, 0x9b, 0x8a, 0x2e, 0x68, 0x1f, 0x3c, 0x1e, 0x09, 0x08, 0xef, 0x7b}, - btcutil.PKFHybrid, chaincfg.MainNetParams.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFHybrid, chaincfg.MainNetParams.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x07, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, @@ -392,7 +392,7 @@ func TestAddresses(t *testing.T) { 0x8a, 0x7e, 0xf8, 0xbd, 0x3b, 0x3c, 0xfb, 0x1e, 0xdb, 0x71, 0x17, 0xab, 0x65, 0x12, 0x9b, 0x8a, 0x2e, 0x68, 0x1f, 0x3c, 0x1e, 0x09, 0x08, 0xef, 0x7b} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -401,20 +401,20 @@ func TestAddresses(t *testing.T) { addr: "02192d74d0cb94344c9569c2e77901573d8d7903c3ebec3a957724895dca52c6b4", encoded: "mhiDPVP2nJunaAgTjzWSHCYfAqxxrxzjmo", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, 0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24, 0x89, 0x5d, 0xca, 0x52, 0xc6, 0xb4}, - btcutil.PKFCompressed, chaincfg.TestNet3Params.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFCompressed, chaincfg.TestNet3Params.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x02, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, 0xc3, 0xeb, 0xec, 0x3a, 0x95, 0x77, 0x24, 0x89, 0x5d, 0xca, 0x52, 0xc6, 0xb4} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -423,20 +423,20 @@ func TestAddresses(t *testing.T) { addr: "03b0bd634234abbb1ba1e986e884185c61cf43e001f9137f23c2c409273eb16e65", encoded: "mkPETRTSzU8MZLHkFKBmbKppxmdw9qT42t", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x03, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, 0x01, 0xf9, 0x13, 0x7f, 0x23, 0xc2, 0xc4, 0x09, 0x27, 0x3e, 0xb1, 0x6e, 0x65}, - btcutil.PKFCompressed, chaincfg.TestNet3Params.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFCompressed, chaincfg.TestNet3Params.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x03, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, 0x01, 0xf9, 0x13, 0x7f, 0x23, 0xc2, 0xc4, 0x09, 0x27, 0x3e, 0xb1, 0x6e, 0x65} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -446,7 +446,7 @@ func TestAddresses(t *testing.T) { "cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3", encoded: "mh8YhPYEAYs3E7EVyKtB5xrcfMExkkdEMF", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x04, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a, 0x01, 0x6b, 0x49, 0x84, 0x0f, 0x8c, 0x53, 0xbc, 0x1e, 0xb6, 0x8a, 0x38, @@ -455,8 +455,8 @@ func TestAddresses(t *testing.T) { 0xf9, 0x74, 0x44, 0x64, 0xf8, 0x2e, 0x16, 0x0b, 0xfa, 0x9b, 0x8b, 0x64, 0xf9, 0xd4, 0xc0, 0x3f, 0x99, 0x9b, 0x86, 0x43, 0xf6, 0x56, 0xb4, 0x12, 0xa3}, - btcutil.PKFUncompressed, chaincfg.TestNet3Params.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFUncompressed, chaincfg.TestNet3Params.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x04, 0x11, 0xdb, 0x93, 0xe1, 0xdc, 0xdb, 0x8a, 0x01, 0x6b, 0x49, 0x84, 0x0f, 0x8c, 0x53, 0xbc, 0x1e, 0xb6, 0x8a, 0x38, @@ -465,7 +465,7 @@ func TestAddresses(t *testing.T) { 0xf9, 0x74, 0x44, 0x64, 0xf8, 0x2e, 0x16, 0x0b, 0xfa, 0x9b, 0x8b, 0x64, 0xf9, 0xd4, 0xc0, 0x3f, 0x99, 0x9b, 0x86, 0x43, 0xf6, 0x56, 0xb4, 0x12, 0xa3} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -475,7 +475,7 @@ func TestAddresses(t *testing.T) { "40d45264838c0bd96852662ce6a847b197376830160c6d2eb5e6a4c44d33f453e", encoded: "my639vCVzbDZuEiX44adfTUg6anRomZLEP", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x06, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, @@ -484,8 +484,8 @@ func TestAddresses(t *testing.T) { 0x96, 0x85, 0x26, 0x62, 0xce, 0x6a, 0x84, 0x7b, 0x19, 0x73, 0x76, 0x83, 0x01, 0x60, 0xc6, 0xd2, 0xeb, 0x5e, 0x6a, 0x4c, 0x44, 0xd3, 0x3f, 0x45, 0x3e}, - btcutil.PKFHybrid, chaincfg.TestNet3Params.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFHybrid, chaincfg.TestNet3Params.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x06, 0x19, 0x2d, 0x74, 0xd0, 0xcb, 0x94, 0x34, 0x4c, 0x95, 0x69, 0xc2, 0xe7, 0x79, 0x01, 0x57, 0x3d, 0x8d, 0x79, 0x03, @@ -494,7 +494,7 @@ func TestAddresses(t *testing.T) { 0x96, 0x85, 0x26, 0x62, 0xce, 0x6a, 0x84, 0x7b, 0x19, 0x73, 0x76, 0x83, 0x01, 0x60, 0xc6, 0xd2, 0xeb, 0x5e, 0x6a, 0x4c, 0x44, 0xd3, 0x3f, 0x45, 0x3e} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -504,7 +504,7 @@ func TestAddresses(t *testing.T) { "537a576782eba668a7ef8bd3b3cfb1edb7117ab65129b8a2e681f3c1e0908ef7b", encoded: "muUnepk5nPPrxUTuTAhRqrpAQuSWS5fVii", valid: true, - result: btcutil.TstAddressPubKey( + result: lbcutil.TstAddressPubKey( []byte{ 0x07, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, @@ -513,8 +513,8 @@ func TestAddresses(t *testing.T) { 0x8a, 0x7e, 0xf8, 0xbd, 0x3b, 0x3c, 0xfb, 0x1e, 0xdb, 0x71, 0x17, 0xab, 0x65, 0x12, 0x9b, 0x8a, 0x2e, 0x68, 0x1f, 0x3c, 0x1e, 0x09, 0x08, 0xef, 0x7b}, - btcutil.PKFHybrid, chaincfg.TestNet3Params.PubKeyHashAddrID), - f: func() (btcutil.Address, error) { + lbcutil.PKFHybrid, chaincfg.TestNet3Params.PubKeyHashAddrID), + f: func() (lbcutil.Address, error) { serializedPubKey := []byte{ 0x07, 0xb0, 0xbd, 0x63, 0x42, 0x34, 0xab, 0xbb, 0x1b, 0xa1, 0xe9, 0x86, 0xe8, 0x84, 0x18, 0x5c, 0x61, 0xcf, 0x43, 0xe0, @@ -523,7 +523,7 @@ func TestAddresses(t *testing.T) { 0x8a, 0x7e, 0xf8, 0xbd, 0x3b, 0x3c, 0xfb, 0x1e, 0xdb, 0x71, 0x17, 0xab, 0x65, 0x12, 0x9b, 0x8a, 0x2e, 0x68, 0x1f, 0x3c, 0x1e, 0x09, 0x08, 0xef, 0x7b} - return btcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) + return lbcutil.NewAddressPubKey(serializedPubKey, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -533,17 +533,17 @@ func TestAddresses(t *testing.T) { addr: "BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4", encoded: "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4", valid: true, - result: btcutil.TstAddressWitnessPubKeyHash( + result: lbcutil.TstAddressWitnessPubKeyHash( 0, [20]byte{ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6}, chaincfg.MainNetParams.Bech32HRPSegwit), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6} - return btcutil.NewAddressWitnessPubKeyHash(pkHash, &chaincfg.MainNetParams) + return lbcutil.NewAddressWitnessPubKeyHash(pkHash, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -552,7 +552,7 @@ func TestAddresses(t *testing.T) { addr: "bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3", encoded: "bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3", valid: true, - result: btcutil.TstAddressWitnessScriptHash( + result: lbcutil.TstAddressWitnessScriptHash( 0, [32]byte{ 0x18, 0x63, 0x14, 0x3c, 0x14, 0xc5, 0x16, 0x68, @@ -560,13 +560,13 @@ func TestAddresses(t *testing.T) { 0x6c, 0x98, 0x56, 0x78, 0xcd, 0x4d, 0x27, 0xa1, 0xb8, 0xc6, 0x32, 0x96, 0x04, 0x90, 0x32, 0x62}, chaincfg.MainNetParams.Bech32HRPSegwit), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { scriptHash := []byte{ 0x18, 0x63, 0x14, 0x3c, 0x14, 0xc5, 0x16, 0x68, 0x04, 0xbd, 0x19, 0x20, 0x33, 0x56, 0xda, 0x13, 0x6c, 0x98, 0x56, 0x78, 0xcd, 0x4d, 0x27, 0xa1, 0xb8, 0xc6, 0x32, 0x96, 0x04, 0x90, 0x32, 0x62} - return btcutil.NewAddressWitnessScriptHash(scriptHash, &chaincfg.MainNetParams) + return lbcutil.NewAddressWitnessScriptHash(scriptHash, &chaincfg.MainNetParams) }, net: &chaincfg.MainNetParams, }, @@ -575,17 +575,17 @@ func TestAddresses(t *testing.T) { addr: "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx", encoded: "tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx", valid: true, - result: btcutil.TstAddressWitnessPubKeyHash( + result: lbcutil.TstAddressWitnessPubKeyHash( 0, [20]byte{ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6}, chaincfg.TestNet3Params.Bech32HRPSegwit), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6} - return btcutil.NewAddressWitnessPubKeyHash(pkHash, &chaincfg.TestNet3Params) + return lbcutil.NewAddressWitnessPubKeyHash(pkHash, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -594,7 +594,7 @@ func TestAddresses(t *testing.T) { addr: "tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7", encoded: "tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7", valid: true, - result: btcutil.TstAddressWitnessScriptHash( + result: lbcutil.TstAddressWitnessScriptHash( 0, [32]byte{ 0x18, 0x63, 0x14, 0x3c, 0x14, 0xc5, 0x16, 0x68, @@ -602,13 +602,13 @@ func TestAddresses(t *testing.T) { 0x6c, 0x98, 0x56, 0x78, 0xcd, 0x4d, 0x27, 0xa1, 0xb8, 0xc6, 0x32, 0x96, 0x04, 0x90, 0x32, 0x62}, chaincfg.TestNet3Params.Bech32HRPSegwit), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { scriptHash := []byte{ 0x18, 0x63, 0x14, 0x3c, 0x14, 0xc5, 0x16, 0x68, 0x04, 0xbd, 0x19, 0x20, 0x33, 0x56, 0xda, 0x13, 0x6c, 0x98, 0x56, 0x78, 0xcd, 0x4d, 0x27, 0xa1, 0xb8, 0xc6, 0x32, 0x96, 0x04, 0x90, 0x32, 0x62} - return btcutil.NewAddressWitnessScriptHash(scriptHash, &chaincfg.TestNet3Params) + return lbcutil.NewAddressWitnessScriptHash(scriptHash, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -617,7 +617,7 @@ func TestAddresses(t *testing.T) { addr: "tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy", encoded: "tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy", valid: true, - result: btcutil.TstAddressWitnessScriptHash( + result: lbcutil.TstAddressWitnessScriptHash( 0, [32]byte{ 0x00, 0x00, 0x00, 0xc4, 0xa5, 0xca, 0xd4, 0x62, @@ -625,13 +625,13 @@ func TestAddresses(t *testing.T) { 0x36, 0x2b, 0x99, 0xd5, 0xe9, 0x1c, 0x6c, 0xe2, 0x4d, 0x16, 0x5d, 0xab, 0x93, 0xe8, 0x64, 0x33}, chaincfg.TestNet3Params.Bech32HRPSegwit), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { scriptHash := []byte{ 0x00, 0x00, 0x00, 0xc4, 0xa5, 0xca, 0xd4, 0x62, 0x21, 0xb2, 0xa1, 0x87, 0x90, 0x5e, 0x52, 0x66, 0x36, 0x2b, 0x99, 0xd5, 0xe9, 0x1c, 0x6c, 0xe2, 0x4d, 0x16, 0x5d, 0xab, 0x93, 0xe8, 0x64, 0x33} - return btcutil.NewAddressWitnessScriptHash(scriptHash, &chaincfg.TestNet3Params) + return lbcutil.NewAddressWitnessScriptHash(scriptHash, &chaincfg.TestNet3Params) }, net: &chaincfg.TestNet3Params, }, @@ -640,18 +640,18 @@ func TestAddresses(t *testing.T) { addr: "LTC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KGMN4N9", encoded: "ltc1qw508d6qejxtdg4y5r3zarvary0c5xw7kgmn4n9", valid: true, - result: btcutil.TstAddressWitnessPubKeyHash( + result: lbcutil.TstAddressWitnessPubKeyHash( 0, [20]byte{ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6}, CustomParams.Bech32HRPSegwit, ), - f: func() (btcutil.Address, error) { + f: func() (lbcutil.Address, error) { pkHash := []byte{ 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6} - return btcutil.NewAddressWitnessPubKeyHash(pkHash, &customParams) + return lbcutil.NewAddressWitnessPubKeyHash(pkHash, &customParams) }, net: &customParams, }, @@ -737,7 +737,7 @@ func TestAddresses(t *testing.T) { for _, test := range tests { // Decode addr and compare error against valid. - decoded, err := btcutil.DecodeAddress(test.addr, test.net) + decoded, err := lbcutil.DecodeAddress(test.addr, test.net) if (err == nil) != test.valid { t.Errorf("%v: decoding test failed: %v", test.name, err) return @@ -774,20 +774,20 @@ func TestAddresses(t *testing.T) { // Perform type-specific calculations. var saddr []byte switch d := decoded.(type) { - case *btcutil.AddressPubKeyHash: - saddr = btcutil.TstAddressSAddr(encoded) + case *lbcutil.AddressPubKeyHash: + saddr = lbcutil.TstAddressSAddr(encoded) - case *btcutil.AddressScriptHash: - saddr = btcutil.TstAddressSAddr(encoded) + case *lbcutil.AddressScriptHash: + saddr = lbcutil.TstAddressSAddr(encoded) - case *btcutil.AddressPubKey: + case *lbcutil.AddressPubKey: // Ignore the error here since the script // address is checked below. saddr, _ = hex.DecodeString(d.String()) - case *btcutil.AddressWitnessPubKeyHash: - saddr = btcutil.TstAddressSegwitSAddr(encoded) - case *btcutil.AddressWitnessScriptHash: - saddr = btcutil.TstAddressSegwitSAddr(encoded) + case *lbcutil.AddressWitnessPubKeyHash: + saddr = lbcutil.TstAddressSegwitSAddr(encoded) + case *lbcutil.AddressWitnessScriptHash: + saddr = lbcutil.TstAddressSegwitSAddr(encoded) } // Check script address, as well as the Hash160 method for P2PKH and @@ -798,28 +798,28 @@ func TestAddresses(t *testing.T) { return } switch a := decoded.(type) { - case *btcutil.AddressPubKeyHash: + case *lbcutil.AddressPubKeyHash: if h := a.Hash160()[:]; !bytes.Equal(saddr, h) { t.Errorf("%v: hashes do not match:\n%x != \n%x", test.name, saddr, h) return } - case *btcutil.AddressScriptHash: + case *lbcutil.AddressScriptHash: if h := a.Hash160()[:]; !bytes.Equal(saddr, h) { t.Errorf("%v: hashes do not match:\n%x != \n%x", test.name, saddr, h) return } - case *btcutil.AddressWitnessPubKeyHash: + case *lbcutil.AddressWitnessPubKeyHash: if hrp := a.Hrp(); test.net.Bech32HRPSegwit != hrp { t.Errorf("%v: hrps do not match:\n%x != \n%x", test.name, test.net.Bech32HRPSegwit, hrp) return } - expVer := test.result.(*btcutil.AddressWitnessPubKeyHash).WitnessVersion() + expVer := test.result.(*lbcutil.AddressWitnessPubKeyHash).WitnessVersion() if v := a.WitnessVersion(); v != expVer { t.Errorf("%v: witness versions do not match:\n%x != \n%x", test.name, expVer, v) @@ -832,14 +832,14 @@ func TestAddresses(t *testing.T) { return } - case *btcutil.AddressWitnessScriptHash: + case *lbcutil.AddressWitnessScriptHash: if hrp := a.Hrp(); test.net.Bech32HRPSegwit != hrp { t.Errorf("%v: hrps do not match:\n%x != \n%x", test.name, test.net.Bech32HRPSegwit, hrp) return } - expVer := test.result.(*btcutil.AddressWitnessScriptHash).WitnessVersion() + expVer := test.result.(*lbcutil.AddressWitnessScriptHash).WitnessVersion() if v := a.WitnessVersion(); v != expVer { t.Errorf("%v: witness versions do not match:\n%x != \n%x", test.name, expVer, v) diff --git a/amount.go b/amount.go index e2f057e..bd6c92e 100644 --- a/amount.go +++ b/amount.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "errors" @@ -29,23 +29,23 @@ const ( // String returns the unit as a string. For recognized units, the SI // prefix is used, or "Satoshi" for the base unit. For all unrecognized -// units, "1eN BTC" is returned, where N is the AmountUnit. +// units, "1eN LBC" is returned, where N is the AmountUnit. func (u AmountUnit) String() string { switch u { case AmountMegaBTC: - return "MBTC" + return "MLBC" case AmountKiloBTC: - return "kBTC" + return "kLBC" case AmountBTC: - return "BTC" + return "LBC" case AmountMilliBTC: - return "mBTC" + return "mLBC" case AmountMicroBTC: - return "μBTC" + return "μLBC" case AmountSatoshi: return "Satoshi" default: - return "1e" + strconv.FormatInt(int64(u), 10) + " BTC" + return "1e" + strconv.FormatInt(int64(u), 10) + " LBC" } } @@ -72,7 +72,7 @@ func round(f float64) Amount { // NewAmount is for specifically for converting BTC to Satoshi. // For creating a new Amount with an int64 value which denotes a quantity of Satoshi, // do a simple type conversion from type int64 to Amount. -// See GoDoc for example: http://godoc.org/github.com/btcsuite/btcutil#example-Amount +// See GoDoc for example: http://godoc.org/github.com/lbryio/lbcutil#example-Amount func NewAmount(f float64) (Amount, error) { // The amount is only considered invalid if it cannot be represented // as an integer type. This may happen if f is NaN or +-Infinity. diff --git a/amount_test.go b/amount_test.go index 808ea24..86054b5 100644 --- a/amount_test.go +++ b/amount_test.go @@ -2,13 +2,13 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil_test +package lbcutil_test import ( "math" "testing" - . "github.com/btcsuite/btcutil" + . "github.com/lbryio/lbcutil" ) func TestAmountCreation(t *testing.T) { @@ -119,40 +119,40 @@ func TestAmountUnitConversions(t *testing.T) { s string }{ { - name: "MBTC", + name: "MLBC", amount: MaxSatoshi, unit: AmountMegaBTC, converted: 21, - s: "21 MBTC", + s: "21 MLBC", }, { - name: "kBTC", + name: "kLBC", amount: 44433322211100, unit: AmountKiloBTC, converted: 444.33322211100, - s: "444.333222111 kBTC", + s: "444.333222111 kLBC", }, { - name: "BTC", + name: "LBC", amount: 44433322211100, unit: AmountBTC, converted: 444333.22211100, - s: "444333.222111 BTC", + s: "444333.222111 LBC", }, { - name: "mBTC", + name: "mLBC", amount: 44433322211100, unit: AmountMilliBTC, converted: 444333222.11100, - s: "444333222.111 mBTC", + s: "444333222.111 mLBC", }, { - name: "μBTC", + name: "μLBC", amount: 44433322211100, unit: AmountMicroBTC, converted: 444333222111.00, - s: "444333222111 μBTC", + s: "444333222111 μLBC", }, { @@ -168,7 +168,7 @@ func TestAmountUnitConversions(t *testing.T) { amount: 44433322211100, unit: AmountUnit(-1), converted: 4443332.2211100, - s: "4443332.22111 1e-1 BTC", + s: "4443332.22111 1e-1 LBC", }, } diff --git a/appdata.go b/appdata.go index e36cf7c..6120482 100644 --- a/appdata.go +++ b/appdata.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "os" diff --git a/appdata_test.go b/appdata_test.go index dff62d4..474f560 100644 --- a/appdata_test.go +++ b/appdata_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil_test +package lbcutil_test import ( "os" @@ -12,7 +12,7 @@ import ( "testing" "unicode" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcutil" ) // TestAppDataDir tests the API for AppDataDir to ensure it gives expected @@ -122,7 +122,7 @@ func TestAppDataDir(t *testing.T) { t.Logf("Running %d tests", len(tests)) for i, test := range tests { - ret := btcutil.TstAppDataDir(test.goos, test.appName, test.roaming) + ret := lbcutil.TstAppDataDir(test.goos, test.appName, test.roaming) if ret != test.want { t.Errorf("appDataDir #%d (%s) does not match - "+ "expected got %s, want %s", i, test.goos, ret, diff --git a/base58/README.md b/base58/README.md index 98dfb1d..63813c5 100644 --- a/base58/README.md +++ b/base58/README.md @@ -1,9 +1,7 @@ base58 ========== -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil) [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/base58) Package base58 provides an API for encoding and decoding to and from the modified base58 encoding. It also provides an API to do Base58Check encoding, @@ -11,24 +9,13 @@ as described [here](https://en.bitcoin.it/wiki/Base58Check_encoding). A comprehensive suite of tests is provided to ensure proper functionality. -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/base58 -``` - ## Examples -* [Decode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-Decode) +* [Decode Example](http://godoc.org/github.com/lbryio/lbcutil/base58#example-Decode) Demonstrates how to decode modified base58 encoded data. -* [Encode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-Encode) +* [Encode Example](http://godoc.org/github.com/lbryio/lbcutil/base58#example-Encode) Demonstrates how to encode data using the modified base58 encoding scheme. -* [CheckDecode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-CheckDecode) +* [CheckDecode Example](http://godoc.org/github.com/lbryio/lbcutil/base58#example-CheckDecode) Demonstrates how to decode Base58Check encoded data. -* [CheckEncode Example](http://godoc.org/github.com/btcsuite/btcutil/base58#example-CheckEncode) - Demonstrates how to encode data using the Base58Check encoding scheme. - -## License - -Package base58 is licensed under the [copyfree](http://copyfree.org) ISC -License. +* [CheckEncode Example](http://godoc.org/github.com/lbryio/lbcutil/base58#example-CheckEncode) + Demonstrates how to encode data using the Base58Check encoding scheme. \ No newline at end of file diff --git a/base58/base58_test.go b/base58/base58_test.go index c4bba4f..2b1fbff 100644 --- a/base58/base58_test.go +++ b/base58/base58_test.go @@ -9,7 +9,7 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcutil/base58" + "github.com/lbryio/lbcutil/base58" ) var stringTests = []struct { diff --git a/base58/base58bench_test.go b/base58/base58bench_test.go index 04c4a00..838a82d 100644 --- a/base58/base58bench_test.go +++ b/base58/base58bench_test.go @@ -8,7 +8,7 @@ import ( "bytes" "testing" - "github.com/btcsuite/btcutil/base58" + "github.com/lbryio/lbcutil/base58" ) var ( diff --git a/base58/base58check_test.go b/base58/base58check_test.go index 7c6350b..e7fc2fb 100644 --- a/base58/base58check_test.go +++ b/base58/base58check_test.go @@ -7,7 +7,7 @@ package base58_test import ( "testing" - "github.com/btcsuite/btcutil/base58" + "github.com/lbryio/lbcutil/base58" ) var checkEncodingStringTests = []struct { diff --git a/base58/example_test.go b/base58/example_test.go index 230a784..671597d 100644 --- a/base58/example_test.go +++ b/base58/example_test.go @@ -7,7 +7,7 @@ package base58_test import ( "fmt" - "github.com/btcsuite/btcutil/base58" + "github.com/lbryio/lbcutil/base58" ) // This example demonstrates how to decode modified base58 encoded data. diff --git a/bech32/README.md b/bech32/README.md index e6fa43f..fc909f6 100644 --- a/bech32/README.md +++ b/bech32/README.md @@ -1,29 +1,16 @@ bech32 ========== -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil) [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://godoc.org/github.com/btcsuite/btcutil/bech32?status.png)](http://godoc.org/github.com/btcsuite/btcutil/bech32) Package bech32 provides a Go implementation of the bech32 format specified in [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki). Test vectors from BIP 173 are added to ensure compatibility with the BIP. -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/bech32 -``` - ## Examples -* [Bech32 decode Example](http://godoc.org/github.com/btcsuite/btcutil/bech32#example-Bech32Decode) +* [Bech32 decode Example](http://godoc.org/github.com/lbryio/lbcutil/bech32#example-Bech32Decode) Demonstrates how to decode a bech32 encoded string. -* [Bech32 encode Example](http://godoc.org/github.com/btcsuite/btcutil/bech32#example-BechEncode) +* [Bech32 encode Example](http://godoc.org/github.com/lbryio/lbcutil/bech32#example-BechEncode) Demonstrates how to encode data into a bech32 string. - -## License - -Package bech32 is licensed under the [copyfree](http://copyfree.org) ISC -License. diff --git a/bech32/example_test.go b/bech32/example_test.go index 6a1f696..1af4f6a 100644 --- a/bech32/example_test.go +++ b/bech32/example_test.go @@ -8,7 +8,7 @@ import ( "encoding/hex" "fmt" - "github.com/btcsuite/btcutil/bech32" + "github.com/lbryio/lbcutil/bech32" ) // This example demonstrates how to decode a bech32 encoded string. diff --git a/block.go b/block.go index 7d38abc..844d7a4 100644 --- a/block.go +++ b/block.go @@ -2,15 +2,15 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "bytes" "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // OutOfRangeError describes an error due to accessing an element that is out @@ -105,7 +105,7 @@ func (b *Block) Hash() *chainhash.Hash { return &hash } -// Tx returns a wrapped transaction (btcutil.Tx) for the transaction at the +// Tx returns a wrapped transaction (lbcutil.Tx) for the transaction at the // specified index in the Block. The supplied index is 0 based. That is to // say, the first transaction in the block is txNum 0. This is nearly // equivalent to accessing the raw transaction (wire.MsgTx) from the @@ -137,10 +137,10 @@ func (b *Block) Tx(txNum int) (*Tx, error) { return newTx, nil } -// Transactions returns a slice of wrapped transactions (btcutil.Tx) for all +// Transactions returns a slice of wrapped transactions (lbcutil.Tx) for all // transactions in the Block. This is nearly equivalent to accessing the raw // transactions (wire.MsgTx) in the underlying wire.MsgBlock, however it -// instead provides easy access to wrapped versions (btcutil.Tx) of them. +// instead provides easy access to wrapped versions (lbcutil.Tx) of them. func (b *Block) Transactions() []*Tx { // Return transactions if they have ALL already been generated. This // flag is necessary because the wrapped transactions are lazily diff --git a/block_test.go b/block_test.go index 4ad8f89..5fb615a 100644 --- a/block_test.go +++ b/block_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil_test +package lbcutil_test import ( "bytes" @@ -11,15 +11,15 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" "github.com/davecgh/go-spew/spew" ) // TestBlock tests the API for Block. func TestBlock(t *testing.T) { - b := btcutil.NewBlock(&Block100000) + b := lbcutil.NewBlock(&Block100000) // Ensure we get the same data back out. if msgBlock := b.MsgBlock(); !reflect.DeepEqual(msgBlock, &Block100000) { @@ -60,7 +60,7 @@ func TestBlock(t *testing.T) { } // Create a new block to nuke all cached data. - b = btcutil.NewBlock(&Block100000) + b = lbcutil.NewBlock(&Block100000) // Request hash for all transactions one at a time via Tx. for i, txHash := range wantTxHashes { @@ -88,7 +88,7 @@ func TestBlock(t *testing.T) { } // Create a new block to nuke all cached data. - b = btcutil.NewBlock(&Block100000) + b = lbcutil.NewBlock(&Block100000) // Request slice of all transactions multiple times to test generation // and caching. @@ -175,7 +175,7 @@ func TestNewBlockFromBytes(t *testing.T) { block100000Bytes := block100000Buf.Bytes() // Create a new block from the serialized bytes. - b, err := btcutil.NewBlockFromBytes(block100000Bytes) + b, err := lbcutil.NewBlockFromBytes(block100000Bytes) if err != nil { t.Errorf("NewBlockFromBytes: %v", err) return @@ -212,7 +212,7 @@ func TestNewBlockFromBlockAndBytes(t *testing.T) { block100000Bytes := block100000Buf.Bytes() // Create a new block from the serialized bytes. - b := btcutil.NewBlockFromBlockAndBytes(&Block100000, block100000Bytes) + b := lbcutil.NewBlockFromBlockAndBytes(&Block100000, block100000Bytes) // Ensure we get the same data back out. serializedBytes, err := b.Bytes() @@ -235,7 +235,7 @@ func TestNewBlockFromBlockAndBytes(t *testing.T) { func TestBlockErrors(t *testing.T) { // Ensure out of range errors are as expected. wantErr := "transaction index -1 is out of range - max 3" - testErr := btcutil.OutOfRangeError(wantErr) + testErr := lbcutil.OutOfRangeError(wantErr) if testErr.Error() != wantErr { t.Errorf("OutOfRangeError: wrong error - got %v, want %v", testErr.Error(), wantErr) @@ -250,7 +250,7 @@ func TestBlockErrors(t *testing.T) { block100000Bytes := block100000Buf.Bytes() // Create a new block from the serialized bytes. - b, err := btcutil.NewBlockFromBytes(block100000Bytes) + b, err := lbcutil.NewBlockFromBytes(block100000Bytes) if err != nil { t.Errorf("NewBlockFromBytes: %v", err) return @@ -258,7 +258,7 @@ func TestBlockErrors(t *testing.T) { // Truncate the block byte buffer to force errors. shortBytes := block100000Bytes[:80] - _, err = btcutil.NewBlockFromBytes(shortBytes) + _, err = lbcutil.NewBlockFromBytes(shortBytes) if err != io.EOF { t.Errorf("NewBlockFromBytes: did not get expected error - "+ "got %v, want %v", err, io.EOF) @@ -266,26 +266,26 @@ func TestBlockErrors(t *testing.T) { // Ensure TxHash returns expected error on invalid indices. _, err = b.TxHash(-1) - if _, ok := err.(btcutil.OutOfRangeError); !ok { + if _, ok := err.(lbcutil.OutOfRangeError); !ok { t.Errorf("TxHash: wrong error - got: %v <%T>, "+ - "want: <%T>", err, err, btcutil.OutOfRangeError("")) + "want: <%T>", err, err, lbcutil.OutOfRangeError("")) } _, err = b.TxHash(len(Block100000.Transactions)) - if _, ok := err.(btcutil.OutOfRangeError); !ok { + if _, ok := err.(lbcutil.OutOfRangeError); !ok { t.Errorf("TxHash: wrong error - got: %v <%T>, "+ - "want: <%T>", err, err, btcutil.OutOfRangeError("")) + "want: <%T>", err, err, lbcutil.OutOfRangeError("")) } // Ensure Tx returns expected error on invalid indices. _, err = b.Tx(-1) - if _, ok := err.(btcutil.OutOfRangeError); !ok { + if _, ok := err.(lbcutil.OutOfRangeError); !ok { t.Errorf("Tx: wrong error - got: %v <%T>, "+ - "want: <%T>", err, err, btcutil.OutOfRangeError("")) + "want: <%T>", err, err, lbcutil.OutOfRangeError("")) } _, err = b.Tx(len(Block100000.Transactions)) - if _, ok := err.(btcutil.OutOfRangeError); !ok { + if _, ok := err.(lbcutil.OutOfRangeError); !ok { t.Errorf("Tx: wrong error - got: %v <%T>, "+ - "want: <%T>", err, err, btcutil.OutOfRangeError("")) + "want: <%T>", err, err, lbcutil.OutOfRangeError("")) } // Ensure TxLoc returns expected error with short byte buffer. diff --git a/bloom/README.md b/bloom/README.md index a317734..1b10b89 100644 --- a/bloom/README.md +++ b/bloom/README.md @@ -1,9 +1,7 @@ bloom ===== -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil) [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/bloom) Package bloom provides an API for dealing with bitcoin-specific bloom filters. @@ -12,19 +10,8 @@ A comprehensive suite of tests is provided to ensure proper functionality. See running a POSIX OS, you can run the `cov_report.sh` script for a real-time report. -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/bloom -``` - ## Examples -* [NewFilter Example](http://godoc.org/github.com/btcsuite/btcutil/bloom#example-NewFilter) +* [NewFilter Example](http://godoc.org/github.com/lbryio/lbcutil/bloom#example-NewFilter) Demonstrates how to create a new bloom filter, add a transaction hash to it, - and check if the filter matches the transaction. - -## License - -Package bloom is licensed under the [copyfree](http://copyfree.org) ISC -License. + and check if the filter matches the transaction. \ No newline at end of file diff --git a/bloom/example_test.go b/bloom/example_test.go index f45ec2f..9c748ea 100644 --- a/bloom/example_test.go +++ b/bloom/example_test.go @@ -9,9 +9,9 @@ import ( "math/rand" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil/bloom" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil/bloom" ) // This example demonstrates how to create a new bloom filter, add a transaction diff --git a/bloom/filter.go b/bloom/filter.go index b3379ec..1141f10 100644 --- a/bloom/filter.go +++ b/bloom/filter.go @@ -9,10 +9,10 @@ import ( "math" "sync" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" ) // ln2Squared is simply the square of the natural log of 2. @@ -270,7 +270,7 @@ func (bf *Filter) maybeAddOutpoint(pkScript []byte, outHash *chainhash.Hash, out // update flags set via the loaded filter if needed. // // This function MUST be called with the filter lock held. -func (bf *Filter) matchTxAndUpdate(tx *btcutil.Tx) bool { +func (bf *Filter) matchTxAndUpdate(tx *lbcutil.Tx) bool { // Check if the filter matches the hash of the transaction. // This is useful for finding transactions when they appear in a block. matched := bf.matches(tx.Hash()[:]) @@ -335,7 +335,7 @@ func (bf *Filter) matchTxAndUpdate(tx *btcutil.Tx) bool { // update flags set via the loaded filter if needed. // // This function is safe for concurrent access. -func (bf *Filter) MatchTxAndUpdate(tx *btcutil.Tx) bool { +func (bf *Filter) MatchTxAndUpdate(tx *lbcutil.Tx) bool { bf.mtx.Lock() match := bf.matchTxAndUpdate(tx) bf.mtx.Unlock() diff --git a/bloom/filter_test.go b/bloom/filter_test.go index 6589d04..f972486 100644 --- a/bloom/filter_test.go +++ b/bloom/filter_test.go @@ -9,10 +9,10 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/bloom" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/bloom" ) // TestFilterLarge ensures a maximum sized filter can be created. @@ -214,7 +214,7 @@ func TestFilterInsertWithTweak(t *testing.T) { func TestFilterInsertKey(t *testing.T) { secret := "5Kg1gnAjaLfKiwhhPpGS3QfRg2m6awQvaj98JCZBZQ5SuS2F15C" - wif, err := btcutil.DecodeWIF(secret) + wif, err := lbcutil.DecodeWIF(secret) if err != nil { t.Errorf("TestFilterInsertKey DecodeWIF failed: %v", err) return @@ -222,7 +222,7 @@ func TestFilterInsertKey(t *testing.T) { f := bloom.NewFilter(2, 0, 0.001, wire.BloomUpdateAll) f.Add(wif.SerializePubKey()) - f.Add(btcutil.Hash160(wif.SerializePubKey())) + f.Add(lbcutil.Hash160(wif.SerializePubKey())) want, err := hex.DecodeString("038fc16b080000000000000001") if err != nil { @@ -258,7 +258,7 @@ func TestFilterBloomMatch(t *testing.T) { t.Errorf("TestFilterBloomMatch DecodeString failure: %v", err) return } - tx, err := btcutil.NewTxFromBytes(strBytes) + tx, err := lbcutil.NewTxFromBytes(strBytes) if err != nil { t.Errorf("TestFilterBloomMatch NewTxFromBytes failure: %v", err) return @@ -293,7 +293,7 @@ func TestFilterBloomMatch(t *testing.T) { 0xf5, 0xfe, 0x95, 0xe7, 0x25, 0x59, 0xf2, 0xcc, 0x70, 0x43, 0xf9, 0x88, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00} - spendingTx, err := btcutil.NewTxFromBytes(spendingTxBytes) + spendingTx, err := lbcutil.NewTxFromBytes(spendingTxBytes) if err != nil { t.Errorf("TestFilterBloomMatch NewTxFromBytes failure: %v", err) return @@ -585,7 +585,7 @@ func TestFilterInsertP2PubKeyOnly(t *testing.T) { t.Errorf("TestFilterInsertP2PubKeyOnly DecodeString failed: %v", err) return } - block, err := btcutil.NewBlockFromBytes(blockBytes) + block, err := lbcutil.NewBlockFromBytes(blockBytes) if err != nil { t.Errorf("TestFilterInsertP2PubKeyOnly NewBlockFromBytes failed: %v", err) return diff --git a/bloom/merkleblock.go b/bloom/merkleblock.go index d6796ba..ce6add3 100644 --- a/bloom/merkleblock.go +++ b/bloom/merkleblock.go @@ -5,10 +5,10 @@ package bloom import ( - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" ) // merkleBlock is used to house intermediate information needed to generate a @@ -79,7 +79,7 @@ func (m *merkleBlock) traverseAndBuild(height, pos uint32) { // NewMerkleBlock returns a new *wire.MsgMerkleBlock and an array of the matched // transaction index numbers based on the passed block and filter. -func NewMerkleBlock(block *btcutil.Block, filter *Filter) (*wire.MsgMerkleBlock, []uint32) { +func NewMerkleBlock(block *lbcutil.Block, filter *Filter) (*wire.MsgMerkleBlock, []uint32) { numTx := uint32(len(block.Transactions())) mBlock := merkleBlock{ numTx: numTx, diff --git a/bloom/merkleblock_test.go b/bloom/merkleblock_test.go index bd4a3dc..c1c6e25 100644 --- a/bloom/merkleblock_test.go +++ b/bloom/merkleblock_test.go @@ -9,10 +9,10 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/bloom" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/bloom" ) func TestMerkleBlock3(t *testing.T) { @@ -29,7 +29,7 @@ func TestMerkleBlock3(t *testing.T) { t.Errorf("TestMerkleBlock3 DecodeString failed: %v", err) return } - blk, err := btcutil.NewBlockFromBytes(blockBytes) + blk, err := lbcutil.NewBlockFromBytes(blockBytes) if err != nil { t.Errorf("TestMerkleBlock3 NewBlockFromBytes failed: %v", err) return diff --git a/bloom/murmurhash3_test.go b/bloom/murmurhash3_test.go index a637b24..412f965 100644 --- a/bloom/murmurhash3_test.go +++ b/bloom/murmurhash3_test.go @@ -7,7 +7,7 @@ package bloom_test import ( "testing" - "github.com/btcsuite/btcutil/bloom" + "github.com/lbryio/lbcutil/bloom" ) // TestMurmurHash3 ensure the MurmurHash3 function produces the correct hash diff --git a/bloom/test_coverage.txt b/bloom/test_coverage.txt index e503f26..6e8725c 100644 --- a/bloom/test_coverage.txt +++ b/bloom/test_coverage.txt @@ -1,28 +1,28 @@ -github.com/conformal/btcutil/bloom/murmurhash3.go MurmurHash3 100.00% (31/31) -github.com/conformal/btcutil/bloom/merkleblock.go NewMerkleBlock 100.00% (19/19) -github.com/conformal/btcutil/bloom/merkleblock.go merkleBlock.traverseAndBuild 100.00% (10/10) -github.com/conformal/btcutil/bloom/merkleblock.go merkleBlock.calcHash 100.00% (8/8) -github.com/conformal/btcutil/bloom/filter.go Filter.maybeAddOutpoint 100.00% (7/7) -github.com/conformal/btcutil/bloom/filter.go Filter.addOutPoint 100.00% (4/4) -github.com/conformal/btcutil/bloom/filter.go Filter.IsLoaded 100.00% (4/4) -github.com/conformal/btcutil/bloom/filter.go Filter.MsgFilterLoad 100.00% (4/4) -github.com/conformal/btcutil/bloom/filter.go Filter.matchesOutPoint 100.00% (4/4) -github.com/conformal/btcutil/bloom/filter.go Filter.MatchesOutPoint 100.00% (4/4) -github.com/conformal/btcutil/bloom/filter.go Filter.MatchTxAndUpdate 100.00% (4/4) -github.com/conformal/btcutil/bloom/filter.go Filter.Matches 100.00% (4/4) -github.com/conformal/btcutil/bloom/filter.go Filter.Add 100.00% (3/3) -github.com/conformal/btcutil/bloom/filter.go Filter.Reload 100.00% (3/3) -github.com/conformal/btcutil/bloom/filter.go Filter.Unload 100.00% (3/3) -github.com/conformal/btcutil/bloom/filter.go Filter.AddShaHash 100.00% (3/3) -github.com/conformal/btcutil/bloom/filter.go Filter.AddOutPoint 100.00% (3/3) -github.com/conformal/btcutil/bloom/filter.go minUint32 100.00% (3/3) -github.com/conformal/btcutil/bloom/filter.go Filter.hash 100.00% (2/2) -github.com/conformal/btcutil/bloom/merkleblock.go merkleBlock.calcTreeWidth 100.00% (1/1) -github.com/conformal/btcutil/bloom/filter.go LoadFilter 100.00% (1/1) -github.com/conformal/btcutil/bloom/filter.go Filter.matchTxAndUpdate 91.30% (21/23) -github.com/conformal/btcutil/bloom/filter.go Filter.matches 85.71% (6/7) -github.com/conformal/btcutil/bloom/filter.go NewFilter 81.82% (9/11) -github.com/conformal/btcutil/bloom/filter.go Filter.add 80.00% (4/5) -github.com/conformal/btcutil/bloom ---------------------------- 96.49% (165/171) +github.com/conformal/lbcutil/bloom/murmurhash3.go MurmurHash3 100.00% (31/31) +github.com/conformal/lbcutil/bloom/merkleblock.go NewMerkleBlock 100.00% (19/19) +github.com/conformal/lbcutil/bloom/merkleblock.go merkleBlock.traverseAndBuild 100.00% (10/10) +github.com/conformal/lbcutil/bloom/merkleblock.go merkleBlock.calcHash 100.00% (8/8) +github.com/conformal/lbcutil/bloom/filter.go Filter.maybeAddOutpoint 100.00% (7/7) +github.com/conformal/lbcutil/bloom/filter.go Filter.addOutPoint 100.00% (4/4) +github.com/conformal/lbcutil/bloom/filter.go Filter.IsLoaded 100.00% (4/4) +github.com/conformal/lbcutil/bloom/filter.go Filter.MsgFilterLoad 100.00% (4/4) +github.com/conformal/lbcutil/bloom/filter.go Filter.matchesOutPoint 100.00% (4/4) +github.com/conformal/lbcutil/bloom/filter.go Filter.MatchesOutPoint 100.00% (4/4) +github.com/conformal/lbcutil/bloom/filter.go Filter.MatchTxAndUpdate 100.00% (4/4) +github.com/conformal/lbcutil/bloom/filter.go Filter.Matches 100.00% (4/4) +github.com/conformal/lbcutil/bloom/filter.go Filter.Add 100.00% (3/3) +github.com/conformal/lbcutil/bloom/filter.go Filter.Reload 100.00% (3/3) +github.com/conformal/lbcutil/bloom/filter.go Filter.Unload 100.00% (3/3) +github.com/conformal/lbcutil/bloom/filter.go Filter.AddShaHash 100.00% (3/3) +github.com/conformal/lbcutil/bloom/filter.go Filter.AddOutPoint 100.00% (3/3) +github.com/conformal/lbcutil/bloom/filter.go minUint32 100.00% (3/3) +github.com/conformal/lbcutil/bloom/filter.go Filter.hash 100.00% (2/2) +github.com/conformal/lbcutil/bloom/merkleblock.go merkleBlock.calcTreeWidth 100.00% (1/1) +github.com/conformal/lbcutil/bloom/filter.go LoadFilter 100.00% (1/1) +github.com/conformal/lbcutil/bloom/filter.go Filter.matchTxAndUpdate 91.30% (21/23) +github.com/conformal/lbcutil/bloom/filter.go Filter.matches 85.71% (6/7) +github.com/conformal/lbcutil/bloom/filter.go NewFilter 81.82% (9/11) +github.com/conformal/lbcutil/bloom/filter.go Filter.add 80.00% (4/5) +github.com/conformal/lbcutil/bloom ---------------------------- 96.49% (165/171) diff --git a/certgen.go b/certgen.go index bbc45a4..d827728 100644 --- a/certgen.go +++ b/certgen.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "bytes" diff --git a/certgen_test.go b/certgen_test.go index f9e2c95..4551dab 100644 --- a/certgen_test.go +++ b/certgen_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil_test +package lbcutil_test import ( "crypto/x509" @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcutil" //"github.com/davecgh/go-spew/spew" ) @@ -23,7 +23,7 @@ func TestNewTLSCertPair(t *testing.T) { validUntil := time.Unix(time.Now().Add(10*365*24*time.Hour).Unix(), 0) org := "test autogenerated cert" extraHosts := []string{"testtlscert.bogus", "localhost", "127.0.0.1"} - cert, key, err := btcutil.NewTLSCertPair(org, validUntil, extraHosts) + cert, key, err := lbcutil.NewTLSCertPair(org, validUntil, extraHosts) if err != nil { t.Fatalf("failed with unexpected error: %v", err) } diff --git a/coinset/README.md b/coinset/README.md index fd05f8c..5ee00ca 100644 --- a/coinset/README.md +++ b/coinset/README.md @@ -1,9 +1,7 @@ coinset ======= -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil) [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/coinset) Package coinset provides bitcoin-specific convenience functions for selecting from and managing sets of unspent transaction outpoints (UTXOs). @@ -13,12 +11,6 @@ A comprehensive suite of tests is provided to ensure proper functionality. See running a POSIX OS, you can run the `cov_report.sh` script for a real-time report. -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/coinset -``` - ## Usage Each unspent transaction outpoint is represented by the Coin interface. An @@ -63,9 +55,4 @@ msgTx := coinset.NewMsgTxWithInputCoins(selectedCoins) ``` The user can then create the msgTx.TxOut's as required, then sign the -transaction and transmit it to the network. - -## License - -Package coinset is licensed under the [copyfree](http://copyfree.org) ISC -License. +transaction and transmit it to the network. \ No newline at end of file diff --git a/coinset/coins.go b/coinset/coins.go index 1777918..2c51f86 100644 --- a/coinset/coins.go +++ b/coinset/coins.go @@ -9,16 +9,16 @@ import ( "errors" "sort" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" ) // Coin represents a spendable transaction outpoint type Coin interface { Hash() *chainhash.Hash Index() uint32 - Value() btcutil.Amount + Value() lbcutil.Amount PkScript() []byte NumConfs() int64 ValueAge() int64 @@ -39,7 +39,7 @@ type Coins interface { // the CoinSet, otherwise the cached values will be incorrect. type CoinSet struct { coinList *list.List - totalValue btcutil.Amount + totalValue lbcutil.Amount totalValueAge int64 } @@ -70,7 +70,7 @@ func (cs *CoinSet) Coins() []Coin { } // TotalValue returns the total value of the coins in the set. -func (cs *CoinSet) TotalValue() (value btcutil.Amount) { +func (cs *CoinSet) TotalValue() (value lbcutil.Amount) { return cs.totalValue } @@ -149,7 +149,7 @@ var ( // satisfiesTargetValue checks that the totalValue is either exactly the targetValue // or is greater than the targetValue by at least the minChange amount. -func satisfiesTargetValue(targetValue, minChange, totalValue btcutil.Amount) bool { +func satisfiesTargetValue(targetValue, minChange, totalValue lbcutil.Amount) bool { return (totalValue == targetValue || totalValue >= targetValue+minChange) } @@ -165,7 +165,7 @@ func satisfiesTargetValue(targetValue, minChange, totalValue btcutil.Amount) boo // It is important to note that the Coins being used as inputs need to have // a constant ValueAge() during the execution of CoinSelect. type CoinSelector interface { - CoinSelect(targetValue btcutil.Amount, coins []Coin) (Coins, error) + CoinSelect(targetValue lbcutil.Amount, coins []Coin) (Coins, error) } // MinIndexCoinSelector is a CoinSelector that attempts to construct a @@ -173,12 +173,12 @@ type CoinSelector interface { // any number of lower indexes (as in the ordered array) over higher ones. type MinIndexCoinSelector struct { MaxInputs int - MinChangeAmount btcutil.Amount + MinChangeAmount lbcutil.Amount } // CoinSelect will attempt to select coins using the algorithm described // in the MinIndexCoinSelector struct. -func (s MinIndexCoinSelector) CoinSelect(targetValue btcutil.Amount, coins []Coin) (Coins, error) { +func (s MinIndexCoinSelector) CoinSelect(targetValue lbcutil.Amount, coins []Coin) (Coins, error) { cs := NewCoinSet(nil) for n := 0; n < len(coins) && n < s.MaxInputs; n++ { cs.PushCoin(coins[n]) @@ -194,12 +194,12 @@ func (s MinIndexCoinSelector) CoinSelect(targetValue btcutil.Amount, coins []Coi // that uses as few of the inputs as possible. type MinNumberCoinSelector struct { MaxInputs int - MinChangeAmount btcutil.Amount + MinChangeAmount lbcutil.Amount } // CoinSelect will attempt to select coins using the algorithm described // in the MinNumberCoinSelector struct. -func (s MinNumberCoinSelector) CoinSelect(targetValue btcutil.Amount, coins []Coin) (Coins, error) { +func (s MinNumberCoinSelector) CoinSelect(targetValue lbcutil.Amount, coins []Coin) (Coins, error) { sortedCoins := make([]Coin, 0, len(coins)) sortedCoins = append(sortedCoins, coins...) sort.Sort(sort.Reverse(byAmount(sortedCoins))) @@ -216,12 +216,12 @@ func (s MinNumberCoinSelector) CoinSelect(targetValue btcutil.Amount, coins []Co // block. type MaxValueAgeCoinSelector struct { MaxInputs int - MinChangeAmount btcutil.Amount + MinChangeAmount lbcutil.Amount } // CoinSelect will attempt to select coins using the algorithm described // in the MaxValueAgeCoinSelector struct. -func (s MaxValueAgeCoinSelector) CoinSelect(targetValue btcutil.Amount, coins []Coin) (Coins, error) { +func (s MaxValueAgeCoinSelector) CoinSelect(targetValue lbcutil.Amount, coins []Coin) (Coins, error) { sortedCoins := make([]Coin, 0, len(coins)) sortedCoins = append(sortedCoins, coins...) sort.Sort(sort.Reverse(byValueAge(sortedCoins))) @@ -241,13 +241,13 @@ func (s MaxValueAgeCoinSelector) CoinSelect(targetValue btcutil.Amount, coins [] // type MinPriorityCoinSelector struct { MaxInputs int - MinChangeAmount btcutil.Amount + MinChangeAmount lbcutil.Amount MinAvgValueAgePerInput int64 } // CoinSelect will attempt to select coins using the algorithm described // in the MinPriorityCoinSelector struct. -func (s MinPriorityCoinSelector) CoinSelect(targetValue btcutil.Amount, coins []Coin) (Coins, error) { +func (s MinPriorityCoinSelector) CoinSelect(targetValue lbcutil.Amount, coins []Coin) (Coins, error) { possibleCoins := make([]Coin, 0, len(coins)) possibleCoins = append(possibleCoins, coins...) @@ -343,10 +343,10 @@ func (a byAmount) Swap(i, j int) { a[i], a[j] = a[j], a[i] } func (a byAmount) Less(i, j int) bool { return a[i].Value() < a[j].Value() } // SimpleCoin defines a concrete instance of Coin that is backed by a -// btcutil.Tx, a specific outpoint index, and the number of confirmations +// lbcutil.Tx, a specific outpoint index, and the number of confirmations // that transaction has had. type SimpleCoin struct { - Tx *btcutil.Tx + Tx *lbcutil.Tx TxIndex uint32 TxNumConfs int64 } @@ -370,8 +370,8 @@ func (c *SimpleCoin) txOut() *wire.TxOut { } // Value returns the value of the Coin -func (c *SimpleCoin) Value() btcutil.Amount { - return btcutil.Amount(c.txOut().Value) +func (c *SimpleCoin) Value() lbcutil.Amount { + return lbcutil.Amount(c.txOut().Value) } // PkScript returns the outpoint script of the Coin. diff --git a/coinset/coins_test.go b/coinset/coins_test.go index d8ca496..87267c9 100644 --- a/coinset/coins_test.go +++ b/coinset/coins_test.go @@ -11,27 +11,27 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/coinset" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/coinset" ) type TestCoin struct { TxHash *chainhash.Hash TxIndex uint32 - TxValue btcutil.Amount + TxValue lbcutil.Amount TxNumConfs int64 } func (c *TestCoin) Hash() *chainhash.Hash { return c.TxHash } func (c *TestCoin) Index() uint32 { return c.TxIndex } -func (c *TestCoin) Value() btcutil.Amount { return c.TxValue } +func (c *TestCoin) Value() lbcutil.Amount { return c.TxValue } func (c *TestCoin) PkScript() []byte { return nil } func (c *TestCoin) NumConfs() int64 { return c.TxNumConfs } func (c *TestCoin) ValueAge() int64 { return int64(c.TxValue) * c.TxNumConfs } -func NewCoin(index int64, value btcutil.Amount, numConfs int64) coinset.Coin { +func NewCoin(index int64, value lbcutil.Amount, numConfs int64) coinset.Coin { h := sha256.New() h.Write([]byte(fmt.Sprintf("%d", index))) hash, _ := chainhash.NewHash(h.Sum(nil)) @@ -47,7 +47,7 @@ func NewCoin(index int64, value btcutil.Amount, numConfs int64) coinset.Coin { type coinSelectTest struct { selector coinset.CoinSelector inputCoins []coinset.Coin - targetValue btcutil.Amount + targetValue lbcutil.Amount expectedCoins []coinset.Coin expectedError error } @@ -225,12 +225,12 @@ var ( testSimpleCoinNumConfs = int64(1) testSimpleCoinTxHash = "9b5965c86de51d5dc824e179a05cf232db78c80ae86ca9d7cb2a655b5e19c1e2" testSimpleCoinTxHex = "0100000001a214a110f79e4abe073865ea5b3745c6e82c913bad44be70652804a5e4003b0a010000008c493046022100edd18a69664efa57264be207100c203e6cade1888cbb88a0ad748548256bb2f0022100f1027dc2e6c7f248d78af1dd90027b5b7d8ec563bb62aa85d4e74d6376f3868c0141048f3757b65ed301abd1b0e8942d1ab5b50594d3314cff0299f300c696376a0a9bf72e74710a8af7a5372d4af4bb519e2701a094ef48c8e48e3b65b28502452dceffffffff02e0673500000000001976a914686dd149a79b4a559d561fbc396d3e3c6628b98d88ace86ef102000000001976a914ac3f995655e81b875b38b64351d6f896ddbfc68588ac00000000" - testSimpleCoinTxValue0 = btcutil.Amount(3500000) + testSimpleCoinTxValue0 = lbcutil.Amount(3500000) testSimpleCoinTxValueAge0 = int64(testSimpleCoinTxValue0) * testSimpleCoinNumConfs testSimpleCoinTxPkScript0Hex = "76a914686dd149a79b4a559d561fbc396d3e3c6628b98d88ac" testSimpleCoinTxPkScript0Bytes, _ = hex.DecodeString(testSimpleCoinTxPkScript0Hex) testSimpleCoinTxBytes, _ = hex.DecodeString(testSimpleCoinTxHex) - testSimpleCoinTx, _ = btcutil.NewTxFromBytes(testSimpleCoinTxBytes) + testSimpleCoinTx, _ = lbcutil.NewTxFromBytes(testSimpleCoinTxBytes) testSimpleCoin = &coinset.SimpleCoin{ Tx: testSimpleCoinTx, TxIndex: 0, diff --git a/coinset/test_coverage.txt b/coinset/test_coverage.txt index 0e3e15d..99c265d 100644 --- a/coinset/test_coverage.txt +++ b/coinset/test_coverage.txt @@ -1,31 +1,31 @@ -github.com/conformal/btcutil/coinset/coins.go MinPriorityCoinSelector.CoinSelect 100.00% (39/39) -github.com/conformal/btcutil/coinset/coins.go NewMsgTxWithInputCoins 100.00% (6/6) -github.com/conformal/btcutil/coinset/coins.go MinIndexCoinSelector.CoinSelect 100.00% (6/6) -github.com/conformal/btcutil/coinset/coins.go CoinSet.removeElement 100.00% (5/5) -github.com/conformal/btcutil/coinset/coins.go NewCoinSet 100.00% (4/4) -github.com/conformal/btcutil/coinset/coins.go CoinSet.Coins 100.00% (4/4) -github.com/conformal/btcutil/coinset/coins.go CoinSet.PopCoin 100.00% (4/4) -github.com/conformal/btcutil/coinset/coins.go CoinSet.ShiftCoin 100.00% (4/4) -github.com/conformal/btcutil/coinset/coins.go MinNumberCoinSelector.CoinSelect 100.00% (4/4) -github.com/conformal/btcutil/coinset/coins.go MaxValueAgeCoinSelector.CoinSelect 100.00% (4/4) -github.com/conformal/btcutil/coinset/coins.go CoinSet.PushCoin 100.00% (3/3) -github.com/conformal/btcutil/coinset/coins.go CoinSet.TotalValueAge 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go SimpleCoin.NumConfs 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go SimpleCoin.ValueAge 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go CoinSet.TotalValue 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go byValueAge.Len 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go byValueAge.Swap 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go byValueAge.Less 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go byAmount.Len 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go byAmount.Swap 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go byAmount.Less 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go SimpleCoin.Hash 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go SimpleCoin.Index 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go SimpleCoin.txOut 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go SimpleCoin.Value 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go SimpleCoin.PkScript 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go CoinSet.Num 100.00% (1/1) -github.com/conformal/btcutil/coinset/coins.go satisfiesTargetValue 100.00% (1/1) -github.com/conformal/btcutil/coinset ---------------------------------- 100.00% (100/100) +github.com/conformal/lbcutil/coinset/coins.go MinPriorityCoinSelector.CoinSelect 100.00% (39/39) +github.com/conformal/lbcutil/coinset/coins.go NewMsgTxWithInputCoins 100.00% (6/6) +github.com/conformal/lbcutil/coinset/coins.go MinIndexCoinSelector.CoinSelect 100.00% (6/6) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.removeElement 100.00% (5/5) +github.com/conformal/lbcutil/coinset/coins.go NewCoinSet 100.00% (4/4) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.Coins 100.00% (4/4) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.PopCoin 100.00% (4/4) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.ShiftCoin 100.00% (4/4) +github.com/conformal/lbcutil/coinset/coins.go MinNumberCoinSelector.CoinSelect 100.00% (4/4) +github.com/conformal/lbcutil/coinset/coins.go MaxValueAgeCoinSelector.CoinSelect 100.00% (4/4) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.PushCoin 100.00% (3/3) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.TotalValueAge 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go SimpleCoin.NumConfs 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go SimpleCoin.ValueAge 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.TotalValue 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go byValueAge.Len 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go byValueAge.Swap 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go byValueAge.Less 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go byAmount.Len 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go byAmount.Swap 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go byAmount.Less 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go SimpleCoin.Hash 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go SimpleCoin.Index 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go SimpleCoin.txOut 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go SimpleCoin.Value 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go SimpleCoin.PkScript 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go CoinSet.Num 100.00% (1/1) +github.com/conformal/lbcutil/coinset/coins.go satisfiesTargetValue 100.00% (1/1) +github.com/conformal/lbcutil/coinset ---------------------------------- 100.00% (100/100) diff --git a/const.go b/const.go index 41d48b3..bcd7314 100644 --- a/const.go +++ b/const.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil const ( // SatoshiPerBitcent is the number of satoshi in one bitcoin cent. diff --git a/doc.go b/doc.go index 36cda1c..5d29fd9 100644 --- a/doc.go +++ b/doc.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. /* -Package btcutil provides bitcoin-specific convenience functions and types. +Package lbcutil provides bitcoin-specific convenience functions and types. Block Overview @@ -36,11 +36,11 @@ To decode/encode an address: "e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d57" + "8a4c702b6bf11d5f" defaultNet := &chaincfg.MainNetParams - addr, err := btcutil.DecodeAddress(addrString, defaultNet) + addr, err := lbcutil.DecodeAddress(addrString, defaultNet) if err != nil { fmt.Println(err) return } fmt.Println(addr.EncodeAddress()) */ -package btcutil +package lbcutil diff --git a/example_test.go b/example_test.go index 73ec9f8..dec585f 100644 --- a/example_test.go +++ b/example_test.go @@ -1,21 +1,21 @@ -package btcutil_test +package lbcutil_test import ( "fmt" "math" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcutil" ) func ExampleAmount() { - a := btcutil.Amount(0) + a := lbcutil.Amount(0) fmt.Println("Zero Satoshi:", a) - a = btcutil.Amount(1e8) + a = lbcutil.Amount(1e8) fmt.Println("100,000,000 Satoshis:", a) - a = btcutil.Amount(1e5) + a = lbcutil.Amount(1e5) fmt.Println("100,000 Satoshis:", a) // Output: // Zero Satoshi: 0 BTC @@ -24,28 +24,28 @@ func ExampleAmount() { } func ExampleNewAmount() { - amountOne, err := btcutil.NewAmount(1) + amountOne, err := lbcutil.NewAmount(1) if err != nil { fmt.Println(err) return } fmt.Println(amountOne) //Output 1 - amountFraction, err := btcutil.NewAmount(0.01234567) + amountFraction, err := lbcutil.NewAmount(0.01234567) if err != nil { fmt.Println(err) return } fmt.Println(amountFraction) //Output 2 - amountZero, err := btcutil.NewAmount(0) + amountZero, err := lbcutil.NewAmount(0) if err != nil { fmt.Println(err) return } fmt.Println(amountZero) //Output 3 - amountNaN, err := btcutil.NewAmount(math.NaN()) + amountNaN, err := lbcutil.NewAmount(math.NaN()) if err != nil { fmt.Println(err) return @@ -59,13 +59,13 @@ func ExampleNewAmount() { } func ExampleAmount_unitConversions() { - amount := btcutil.Amount(44433322211100) + amount := lbcutil.Amount(44433322211100) - fmt.Println("Satoshi to kBTC:", amount.Format(btcutil.AmountKiloBTC)) + fmt.Println("Satoshi to kBTC:", amount.Format(lbcutil.AmountKiloBTC)) fmt.Println("Satoshi to BTC:", amount) - fmt.Println("Satoshi to MilliBTC:", amount.Format(btcutil.AmountMilliBTC)) - fmt.Println("Satoshi to MicroBTC:", amount.Format(btcutil.AmountMicroBTC)) - fmt.Println("Satoshi to Satoshi:", amount.Format(btcutil.AmountSatoshi)) + fmt.Println("Satoshi to MilliBTC:", amount.Format(lbcutil.AmountMilliBTC)) + fmt.Println("Satoshi to MicroBTC:", amount.Format(lbcutil.AmountMicroBTC)) + fmt.Println("Satoshi to Satoshi:", amount.Format(lbcutil.AmountSatoshi)) // Output: // Satoshi to kBTC: 444.333222111 kBTC diff --git a/gcs/README.md b/gcs/README.md index e663a0e..2e21b27 100644 --- a/gcs/README.md +++ b/gcs/README.md @@ -1,24 +1,9 @@ gcs ========== -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)] -(https://travis-ci.org/btcsuite/btcutil) [![ISC License] -(http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](https://godoc.org/github.com/btcsuite/btcutil/gcs?status.png)] -(http://godoc.org/github.com/btcsuite/btcutil/gcs) +[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) Package gcs provides an API for building and using a Golomb-coded set filter similar to that described [here](http://giovanni.bajo.it/post/47119962313/golomb-coded-sets-smaller-than-bloom-filters). -A comprehensive suite of tests is provided to ensure proper functionality. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/gcs -``` - -## License - -Package gcs is licensed under the [copyfree](http://copyfree.org) ISC -License. +A comprehensive suite of tests is provided to ensure proper functionality. \ No newline at end of file diff --git a/gcs/builder/builder.go b/gcs/builder/builder.go index adef5c9..a1d48fd 100644 --- a/gcs/builder/builder.go +++ b/gcs/builder/builder.go @@ -10,10 +10,10 @@ import ( "fmt" "math" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil/gcs" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil/gcs" ) const ( diff --git a/gcs/builder/builder_test.go b/gcs/builder/builder_test.go index 8e9566f..839eef8 100644 --- a/gcs/builder/builder_test.go +++ b/gcs/builder/builder_test.go @@ -9,13 +9,13 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/gcs" - "github.com/btcsuite/btcutil/gcs/builder" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/gcs" + "github.com/lbryio/lbcutil/gcs/builder" ) var ( @@ -79,8 +79,8 @@ func TestUseBlockHash(t *testing.T) { Index: 4321, } - // btcutil.Address - addr, err := btcutil.DecodeAddress(testAddr, &chaincfg.MainNetParams) + // lbcutil.Address + addr, err := lbcutil.DecodeAddress(testAddr, &chaincfg.MainNetParams) if err != nil { t.Fatalf("Address decode failed: %s", err.Error()) } diff --git a/gcs/gcs.go b/gcs/gcs.go index cfe215c..b84cea4 100644 --- a/gcs/gcs.go +++ b/gcs/gcs.go @@ -12,7 +12,7 @@ import ( "sort" "github.com/aead/siphash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" "github.com/kkdai/bstream" ) diff --git a/gcs/gcs_test.go b/gcs/gcs_test.go index 369b773..09ae774 100644 --- a/gcs/gcs_test.go +++ b/gcs/gcs_test.go @@ -11,7 +11,7 @@ import ( "math/rand" "testing" - "github.com/btcsuite/btcutil/gcs" + "github.com/lbryio/lbcutil/gcs" ) var ( diff --git a/gcs/gcsbench_test.go b/gcs/gcsbench_test.go index 58795eb..fa78f1e 100644 --- a/gcs/gcsbench_test.go +++ b/gcs/gcsbench_test.go @@ -10,7 +10,7 @@ import ( "math/rand" "testing" - "github.com/btcsuite/btcutil/gcs" + "github.com/lbryio/lbcutil/gcs" ) func genRandFilterElements(numElements uint) ([][]byte, error) { diff --git a/go.mod b/go.mod index 1bca216..2da5b4e 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,11 @@ module github.com/lbryio/lbcutil -go 1.14 +go 1.16 require ( github.com/aead/siphash v1.0.1 - github.com/btcsuite/btcd v0.20.1-beta - github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d - github.com/davecgh/go-spew v1.1.0 - github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 - golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d + github.com/davecgh/go-spew v1.1.1 + github.com/kkdai/bstream v1.0.0 + github.com/lbryio/lbcd v0.22.100-beta + golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 ) - -replace github.com/btcsuite/btcutil => ./ diff --git a/go.sum b/go.sum index dd5ba03..76f27ce 100644 --- a/go.sum +++ b/go.sum @@ -1,54 +1,555 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= +github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= +github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= +github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= +github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= +github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= +github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= -github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd h1:qdGvebPBDuYDPGi1WCPjy1tGyMpmDK8IEapSsszn7HE= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= -github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723 h1:ZA/jbKoGcVAnER6pCHPEkGdZOV7U1oLUedErBHCUMs0= +github.com/btcsuite/goleveldb v1.0.0 h1:Tvd0BfvqX9o823q1j2UZ/epQo09eJh6dTcRp79ilIN4= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJGQE= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= +github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= +github.com/cockroachdb/errors v1.8.1 h1:A5+txlVZfOqFBDa4mGz2bUWSp0aHElvHX2bKkdbQu+Y= +github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= +github.com/cockroachdb/pebble v0.0.0-20210525181856-e45797baeb78 h1:bsZKpvDmUKiBm14kDi8sMqG3bRsfIJ64NwuaAr/8MZs= +github.com/cockroachdb/pebble v0.0.0-20210525181856-e45797baeb78/go.mod h1:1XpB4cLQcF189RAcWi4gUc110zJgtOfT7SVNGY8sOe0= +github.com/cockroachdb/redact v1.0.8 h1:8QG/764wK+vmEYoOlfobpe12EQcS81ukx/a4hdVMxNw= +github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= +github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= +github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/felixge/fgprof v0.9.1/go.mod h1:7/HK6JFtFaARhIljgP2IV8rJLIoHDoOYoUphsnGvqxE= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= +github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= +github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= +github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1 h1:DqDEcV5aeaTmdFBePNpYsp3FlcVH/2ISVVM9Qf8PSls= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf h1:gFVkHXmVAhEbxZVDln5V9GKrLaluNoFHDbrZwAWZgws= +github.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20200615235658-03e1cf38a040/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= +github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= +github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= -github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23 h1:FOOIBWrEkLgmlgGfMuZT83xIwfPDxEI2OHu6xUmJMFE= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= +github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= +github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= +github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= +github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= +github.com/kkdai/bstream v1.0.0 h1:Se5gHwgp2VT2uHfDrkbbgbgEvV9cimLELwrPJctSjg8= +github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= +github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg= +github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= +github.com/lbryio/lbcd v0.22.100-beta h1:6nv+G+MxxWqIbBLEPkSkc2Z3qhqrP8vVDHkc8+UWyv4= +github.com/lbryio/lbcd v0.22.100-beta/go.mod h1:u8SaFX4xdGMMR5xasBGfgApC8pvD4rnK2OujZnrq5gs= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= +github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= +github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= +github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= +github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shirou/gopsutil/v3 v3.21.7/go.mod h1:RGl11Y7XMTQPmHh8F0ayC6haKNBgH4PXMJuTAcMOlz4= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/tklauser/go-sysconf v0.3.7/go.mod h1:JZIdXh4RmBvZDBZ41ld2bGxRV3n4daiiqA3skYhAoQ4= +github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= +github.com/vmihailenco/msgpack/v5 v5.3.2/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d h1:2+ZP7EfsZV7Vvmx3TIqSlSzATMkTAKqM14YGFPoSKjI= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20200513190911-00229845015e h1:rMqLP+9XLy+LdbCXHjJHAmTfXCr93W7oruWA6Hq1Alc= +golang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= +golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= +gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/hash160.go b/hash160.go index 599a0fe..c615c0c 100644 --- a/hash160.go +++ b/hash160.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "crypto/sha256" diff --git a/hdkeychain/README.md b/hdkeychain/README.md index f9c15d8..f863576 100644 --- a/hdkeychain/README.md +++ b/hdkeychain/README.md @@ -1,9 +1,7 @@ hdkeychain ========== -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil) [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain) Package hdkeychain provides an API for bitcoin hierarchical deterministic extended keys (BIP0032). @@ -24,7 +22,7 @@ report. keys - Support for custom networks by registering them with chaincfg - Obtaining the underlying EC pubkeys, EC privkeys, and associated bitcoin - addresses ties in seamlessly with existing btcec and btcutil types which + addresses ties in seamlessly with existing btcec and lbcutil types which provide powerful tools for working with them to do things like sign transations and generate payment scripts - Uses the btcec package which is highly optimized for secp256k1 @@ -36,24 +34,13 @@ report. - Comprehensive test coverage including the BIP0032 test vectors - Benchmarks -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/hdkeychain -``` - ## Examples -* [NewMaster Example](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain#example-NewMaster) +* [NewMaster Example](http://godoc.org/github.com/lbryio/lbcutil/hdkeychain#example-NewMaster) Demonstrates how to generate a cryptographically random seed then use it to create a new master node (extended key). -* [Default Wallet Layout Example](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain#example-package--DefaultWalletLayout) +* [Default Wallet Layout Example](http://godoc.org/github.com/lbryio/lbcutil/hdkeychain#example-package--DefaultWalletLayout) Demonstrates the default hierarchical deterministic wallet layout as described in BIP0032. -* [Audits Use Case Example](http://godoc.org/github.com/btcsuite/btcutil/hdkeychain#example-package--Audits) - Demonstrates the audits use case in BIP0032. - -## License - -Package hdkeychain is licensed under the [copyfree](http://copyfree.org) ISC -License. +* [Audits Use Case Example](http://godoc.org/github.com/lbryio/lbcutil/hdkeychain#example-package--Audits) + Demonstrates the audits use case in BIP0032. \ No newline at end of file diff --git a/hdkeychain/bench_test.go b/hdkeychain/bench_test.go index 583eef0..0eaf096 100644 --- a/hdkeychain/bench_test.go +++ b/hdkeychain/bench_test.go @@ -7,7 +7,7 @@ package hdkeychain_test import ( "testing" - "github.com/btcsuite/btcutil/hdkeychain" + "github.com/lbryio/lbcutil/hdkeychain" ) // bip0032MasterPriv1 is the master private extended key from the first set of diff --git a/hdkeychain/example_test.go b/hdkeychain/example_test.go index e7f462d..1205c46 100644 --- a/hdkeychain/example_test.go +++ b/hdkeychain/example_test.go @@ -7,8 +7,8 @@ package hdkeychain_test import ( "fmt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcutil/hdkeychain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcutil/hdkeychain" ) // This example demonstrates how to generate a cryptographically random seed diff --git a/hdkeychain/extendedkey.go b/hdkeychain/extendedkey.go index a0c5e7b..44227df 100644 --- a/hdkeychain/extendedkey.go +++ b/hdkeychain/extendedkey.go @@ -18,11 +18,11 @@ import ( "fmt" "math/big" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/base58" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/base58" ) const ( @@ -346,7 +346,7 @@ func (k *ExtendedKey) Derive(i uint32) (*ExtendedKey, error) { // The fingerprint of the parent for the derived child is the first 4 // bytes of the RIPEMD160(SHA256(parentPubKey)). - parentFP := btcutil.Hash160(k.pubKeyBytes())[:4] + parentFP := lbcutil.Hash160(k.pubKeyBytes())[:4] return NewExtendedKey(k.version, childKey, childChainCode, parentFP, k.depth+1, i, isPrivate), nil } @@ -415,7 +415,7 @@ func (k *ExtendedKey) DeriveNonStandard(i uint32) (*ExtendedKey, error) { childKey = pk.SerializeCompressed() } - parentFP := btcutil.Hash160(k.pubKeyBytes())[:4] + parentFP := lbcutil.Hash160(k.pubKeyBytes())[:4] return NewExtendedKey(k.version, childKey, childChainCode, parentFP, k.depth+1, i, isPrivate), nil } @@ -506,9 +506,9 @@ func (k *ExtendedKey) ECPrivKey() (*btcec.PrivateKey, error) { // Address converts the extended key to a standard bitcoin pay-to-pubkey-hash // address for the passed network. -func (k *ExtendedKey) Address(net *chaincfg.Params) (*btcutil.AddressPubKeyHash, error) { - pkHash := btcutil.Hash160(k.pubKeyBytes()) - return btcutil.NewAddressPubKeyHash(pkHash, net) +func (k *ExtendedKey) Address(net *chaincfg.Params) (*lbcutil.AddressPubKeyHash, error) { + pkHash := lbcutil.Hash160(k.pubKeyBytes()) + return lbcutil.NewAddressPubKeyHash(pkHash, net) } // paddedAppend appends the src byte slice to dst, returning the new slice. diff --git a/hdkeychain/extendedkey_test.go b/hdkeychain/extendedkey_test.go index 37a42fa..902ddc2 100644 --- a/hdkeychain/extendedkey_test.go +++ b/hdkeychain/extendedkey_test.go @@ -17,7 +17,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg" ) // TestBIP0032Vectors tests the vectors provided by [BIP32] to ensure the @@ -1196,7 +1196,7 @@ func TestLeadingZero(t *testing.T) { } if hex.EncodeToString(child1nonstandard.key) != "ea46d8f58eb863a2d371a938396af8b0babe85c01920f59a8044412e70e837ee" { - t.Error("incorrect btcutil backwards compatible BIP32-like derivation") + t.Error("incorrect lbcutil backwards compatible BIP32-like derivation") } if !child0.IsAffectedByIssue172() { diff --git a/hdkeychain/test_coverage.txt b/hdkeychain/test_coverage.txt index c0bc7ef..990001d 100644 --- a/hdkeychain/test_coverage.txt +++ b/hdkeychain/test_coverage.txt @@ -1,20 +1,20 @@ -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.String 100.00% (18/18) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.Zero 100.00% (9/9) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.pubKeyBytes 100.00% (7/7) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.Neuter 100.00% (6/6) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.ECPrivKey 100.00% (4/4) -github.com/conformal/btcutil/hdkeychain/extendedkey.go zero 100.00% (3/3) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.SetNet 100.00% (3/3) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.Address 100.00% (2/2) -github.com/conformal/btcutil/hdkeychain/extendedkey.go newExtendedKey 100.00% (1/1) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.IsPrivate 100.00% (1/1) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.ParentFingerprint 100.00% (1/1) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.ECPubKey 100.00% (1/1) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.IsForNet 100.00% (1/1) -github.com/conformal/btcutil/hdkeychain/extendedkey.go NewKeyFromString 95.83% (23/24) -github.com/conformal/btcutil/hdkeychain/extendedkey.go ExtendedKey.Child 91.67% (33/36) -github.com/conformal/btcutil/hdkeychain/extendedkey.go NewMaster 91.67% (11/12) -github.com/conformal/btcutil/hdkeychain/extendedkey.go GenerateSeed 85.71% (6/7) -github.com/conformal/btcutil/hdkeychain ----------------------------- 95.59% (130/136) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.String 100.00% (18/18) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.Zero 100.00% (9/9) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.pubKeyBytes 100.00% (7/7) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.Neuter 100.00% (6/6) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.ECPrivKey 100.00% (4/4) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go zero 100.00% (3/3) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.SetNet 100.00% (3/3) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.Address 100.00% (2/2) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go newExtendedKey 100.00% (1/1) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.IsPrivate 100.00% (1/1) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.ParentFingerprint 100.00% (1/1) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.ECPubKey 100.00% (1/1) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.IsForNet 100.00% (1/1) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go NewKeyFromString 95.83% (23/24) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go ExtendedKey.Child 91.67% (33/36) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go NewMaster 91.67% (11/12) +github.com/conformal/lbcutil/hdkeychain/extendedkey.go GenerateSeed 85.71% (6/7) +github.com/conformal/lbcutil/hdkeychain ----------------------------- 95.59% (130/136) diff --git a/internal_test.go b/internal_test.go index 7462da6..d1bb2d8 100644 --- a/internal_test.go +++ b/internal_test.go @@ -3,18 +3,18 @@ // license that can be found in the LICENSE file. /* -This test file is part of the btcutil package rather than than the -btcutil_test package so it can bridge access to the internals to properly test +This test file is part of the lbcutil package rather than than the +lbcutil_test package so it can bridge access to the internals to properly test cases which are either not possible or can't reliably be tested via the public interface. The functions are only exported while the tests are being run. */ -package btcutil +package lbcutil import ( - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcutil/base58" - "github.com/btcsuite/btcutil/bech32" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcutil/base58" + "github.com/lbryio/lbcutil/bech32" "golang.org/x/crypto/ripemd160" ) diff --git a/net.go b/net.go index bf11733..a80097c 100644 --- a/net.go +++ b/net.go @@ -4,7 +4,7 @@ // +build !appengine -package btcutil +package lbcutil import ( "net" diff --git a/net_noop.go b/net_noop.go index b0b7c2e..bdfc408 100644 --- a/net_noop.go +++ b/net_noop.go @@ -4,7 +4,7 @@ // +build appengine -package btcutil +package lbcutil import ( "net" diff --git a/psbt/creator.go b/psbt/creator.go index a5f832e..90d6432 100644 --- a/psbt/creator.go +++ b/psbt/creator.go @@ -5,7 +5,7 @@ package psbt import ( - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // MinTxVersion is the lowest transaction version that we'll permit. diff --git a/psbt/extractor.go b/psbt/extractor.go index dc7f10f..1b10607 100644 --- a/psbt/extractor.go +++ b/psbt/extractor.go @@ -12,8 +12,8 @@ package psbt import ( "bytes" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" ) // Extract takes a finalized psbt.Packet and outputs a finalized transaction diff --git a/psbt/finalizer.go b/psbt/finalizer.go index 0bf9dbb..44763e2 100644 --- a/psbt/finalizer.go +++ b/psbt/finalizer.go @@ -12,7 +12,7 @@ package psbt // multisig and no other custom script. import ( - "github.com/btcsuite/btcd/txscript" + "github.com/lbryio/lbcd/txscript" ) // isFinalized considers this input finalized if it contains at least one of diff --git a/psbt/go.mod b/psbt/go.mod index d47c286..7e58da4 100644 --- a/psbt/go.mod +++ b/psbt/go.mod @@ -1,9 +1,9 @@ -module github.com/btcsuite/btcutil/psbt +module github.com/lbryio/lbcutil/psbt go 1.13 require ( - github.com/btcsuite/btcd v0.20.1-beta - github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d + github.com/lbryio/lbcd v0.20.1-beta + github.com/lbryio/lbcutil v0.0.0-20190425235716-9e5f4b9a998d github.com/davecgh/go-spew v1.1.1 ) diff --git a/psbt/go.sum b/psbt/go.sum index 96107a5..e154325 100644 --- a/psbt/go.sum +++ b/psbt/go.sum @@ -1,13 +1,13 @@ github.com/aead/siphash v1.0.1 h1:FwHfE/T45KPKYuuSAKyyvE+oPWcaQ+CUmFW0bPlM+kg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= -github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/lbryio/lbcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= +github.com/lbryio/lbcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= -github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v0.0.0-20191219182022-e17c9730c422 h1:EqnrgSSg0SFWRlEZLExgjtuUR/IPnuQ6qw6nwRda4Uk= -github.com/btcsuite/btcutil v0.0.0-20191219182022-e17c9730c422/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/lbryio/lbcutil v0.0.0-20190425235716-9e5f4b9a998d h1:yJzD/yFppdVCf6ApMkVy8cUxV0XrxdP9rVf6D87/Mng= +github.com/lbryio/lbcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= +github.com/lbryio/lbcutil v0.0.0-20191219182022-e17c9730c422 h1:EqnrgSSg0SFWRlEZLExgjtuUR/IPnuQ6qw6nwRda4Uk= +github.com/lbryio/lbcutil v0.0.0-20191219182022-e17c9730c422/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd h1:R/opQEbFEy9JGkIguV40SvRY1uliPX8ifOvi6ICsFCw= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd h1:qdGvebPBDuYDPGi1WCPjy1tGyMpmDK8IEapSsszn7HE= diff --git a/psbt/partial_input.go b/psbt/partial_input.go index 4783c74..6915058 100644 --- a/psbt/partial_input.go +++ b/psbt/partial_input.go @@ -6,8 +6,8 @@ import ( "io" "sort" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" ) // PInput is a struct encapsulating all the data that can be attached to any diff --git a/psbt/partial_output.go b/psbt/partial_output.go index 64d1bd4..2f389ff 100644 --- a/psbt/partial_output.go +++ b/psbt/partial_output.go @@ -5,7 +5,7 @@ import ( "io" "sort" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // POutput is a struct encapsulating all the data that can be attached diff --git a/psbt/partialsig.go b/psbt/partialsig.go index e11bb80..b301836 100644 --- a/psbt/partialsig.go +++ b/psbt/partialsig.go @@ -3,7 +3,7 @@ package psbt import ( "bytes" - "github.com/btcsuite/btcd/btcec" + "github.com/lbryio/lbcd/btcec" ) // PartialSig encapsulate a (BTC public key, ECDSA signature) diff --git a/psbt/profile.cov b/psbt/profile.cov new file mode 100644 index 0000000..79b28a0 --- /dev/null +++ b/psbt/profile.cov @@ -0,0 +1 @@ +mode: atomic diff --git a/psbt/psbt.go b/psbt/psbt.go index 73126c3..bd05636 100644 --- a/psbt/psbt.go +++ b/psbt/psbt.go @@ -14,7 +14,7 @@ import ( "io" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // psbtMagicLength is the length of the magic bytes used to signal the start of diff --git a/psbt/psbt_test.go b/psbt/psbt_test.go index c366766..be7ea3f 100644 --- a/psbt/psbt_test.go +++ b/psbt/psbt_test.go @@ -11,10 +11,10 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" "github.com/davecgh/go-spew/spew" ) @@ -1369,7 +1369,7 @@ func TestWitnessForNonWitnessUtxo(t *testing.T) { }}, TxOut: []*wire.TxOut{{ PkScript: outPkScript, - Value: 1.9 * btcutil.SatoshiPerBitcoin, + Value: 1.9 * lbcutil.SatoshiPerBitcoin, }}, }, Inputs: []PInput{{}}, diff --git a/psbt/signer.go b/psbt/signer.go index 5882653..dfb36ad 100644 --- a/psbt/signer.go +++ b/psbt/signer.go @@ -10,7 +10,7 @@ package psbt // is in the correct state. import ( - "github.com/btcsuite/btcd/txscript" + "github.com/lbryio/lbcd/txscript" ) // SignOutcome is a enum-like value that expresses the outcome of a call to the diff --git a/psbt/sort.go b/psbt/sort.go index 2232d68..afa41ab 100644 --- a/psbt/sort.go +++ b/psbt/sort.go @@ -4,7 +4,7 @@ import ( "bytes" "sort" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // InPlaceSort modifies the passed packet's wire TX inputs and outputs to be @@ -16,7 +16,7 @@ import ( // (partial) witness data since it will mutate the transaction if it's not // already sorted. This can cause issues if you mutate a tx in a block, for // example, which would invalidate the block. It could also cause cached hashes, -// such as in a btcutil.Tx to become invalidated. +// such as in a lbcutil.Tx to become invalidated. // // The function should only be used if the caller is creating the transaction or // is otherwise 100% positive mutating will not cause adverse affects due to diff --git a/psbt/sort_test.go b/psbt/sort_test.go index 3dee0f4..0d668c0 100644 --- a/psbt/sort_test.go +++ b/psbt/sort_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) func TestInPlaceSort(t *testing.T) { diff --git a/psbt/updater.go b/psbt/updater.go index 01fb2f3..fb70673 100644 --- a/psbt/updater.go +++ b/psbt/updater.go @@ -14,9 +14,9 @@ import ( "bytes" "crypto/sha256" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil" ) // Updater encapsulates the role 'Updater' as specified in BIP174; it accepts @@ -125,7 +125,7 @@ func (p *Updater) addPartialSignature(inIndex int, sig []byte, if pInput.RedeemScript != nil { outIndex := p.Upsbt.UnsignedTx.TxIn[inIndex].PreviousOutPoint.Index scriptPubKey := pInput.NonWitnessUtxo.TxOut[outIndex].PkScript - scriptHash := btcutil.Hash160(pInput.RedeemScript) + scriptHash := lbcutil.Hash160(pInput.RedeemScript) scriptHashScript, err := txscript.NewScriptBuilder(). AddOp(txscript.OP_HASH160). @@ -155,7 +155,7 @@ func (p *Updater) addPartialSignature(inIndex int, sig []byte, var script []byte if pInput.RedeemScript != nil { - scriptHash := btcutil.Hash160(pInput.RedeemScript) + scriptHash := lbcutil.Hash160(pInput.RedeemScript) scriptHashScript, err := txscript.NewScriptBuilder(). AddOp(txscript.OP_HASH160). AddData(scriptHash). @@ -195,7 +195,7 @@ func (p *Updater) addPartialSignature(inIndex int, sig []byte, } } else { // Otherwise, this is a p2wkh input. - pubkeyHash := btcutil.Hash160(pubkey) + pubkeyHash := lbcutil.Hash160(pubkey) pubkeyHashScript, err := txscript.NewScriptBuilder(). AddOp(txscript.OP_0). AddData(pubkeyHash). diff --git a/psbt/utils.go b/psbt/utils.go index 494d040..c82ec69 100644 --- a/psbt/utils.go +++ b/psbt/utils.go @@ -12,8 +12,8 @@ import ( "io" "sort" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" ) // WriteTxWitness is a utility function due to non-exported witness diff --git a/psbt/utils_test.go b/psbt/utils_test.go index 90593ff..2a190c5 100644 --- a/psbt/utils_test.go +++ b/psbt/utils_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) func TestSumUtxoInputValues(t *testing.T) { diff --git a/test_coverage.txt b/test_coverage.txt deleted file mode 100644 index e475fad..0000000 --- a/test_coverage.txt +++ /dev/null @@ -1,72 +0,0 @@ - -github.com/conformal/btcutil/base58.go Base58Decode 100.00% (20/20) -github.com/conformal/btcutil/base58.go Base58Encode 100.00% (15/15) -github.com/conformal/btcutil/block.go Block.Tx 100.00% (12/12) -github.com/conformal/btcutil/wif.go WIF.String 100.00% (11/11) -github.com/conformal/btcutil/block.go Block.Transactions 100.00% (11/11) -github.com/conformal/btcutil/amount.go AmountUnit.String 100.00% (8/8) -github.com/conformal/btcutil/tx.go NewTxFromReader 100.00% (6/6) -github.com/conformal/btcutil/block.go NewBlockFromBytes 100.00% (6/6) -github.com/conformal/btcutil/block.go NewBlockFromReader 100.00% (6/6) -github.com/conformal/btcutil/address.go encodeAddress 100.00% (6/6) -github.com/conformal/btcutil/address.go newAddressPubKeyHash 100.00% (5/5) -github.com/conformal/btcutil/address.go newAddressScriptHashFromHash 100.00% (5/5) -github.com/conformal/btcutil/tx.go Tx.Sha 100.00% (5/5) -github.com/conformal/btcutil/block.go Block.Sha 100.00% (5/5) -github.com/conformal/btcutil/amount.go NewAmount 100.00% (5/5) -github.com/conformal/btcutil/amount.go round 100.00% (3/3) -github.com/conformal/btcutil/address.go NewAddressScriptHash 100.00% (2/2) -github.com/conformal/btcutil/amount.go Amount.Format 100.00% (2/2) -github.com/conformal/btcutil/tx.go NewTxFromBytes 100.00% (2/2) -github.com/conformal/btcutil/hash160.go calcHash 100.00% (2/2) -github.com/conformal/btcutil/address.go AddressPubKeyHash.Hash160 100.00% (1/1) -github.com/conformal/btcutil/block.go OutOfRangeError.Error 100.00% (1/1) -github.com/conformal/btcutil/block.go Block.MsgBlock 100.00% (1/1) -github.com/conformal/btcutil/tx.go Tx.MsgTx 100.00% (1/1) -github.com/conformal/btcutil/hash160.go Hash160 100.00% (1/1) -github.com/conformal/btcutil/block.go NewBlockFromBlockAndBytes 100.00% (1/1) -github.com/conformal/btcutil/block.go Block.Height 100.00% (1/1) -github.com/conformal/btcutil/block.go Block.SetHeight 100.00% (1/1) -github.com/conformal/btcutil/block.go NewBlock 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.IsForNet 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.EncodeAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go NewAddressPubKeyHash 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.EncodeAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.ScriptAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKeyHash.String 100.00% (1/1) -github.com/conformal/btcutil/address.go NewAddressScriptHashFromHash 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.EncodeAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.ScriptAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.IsForNet 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.String 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressScriptHash.Hash160 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.ScriptAddress 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.IsForNet 100.00% (1/1) -github.com/conformal/btcutil/address.go AddressPubKey.String 100.00% (1/1) -github.com/conformal/btcutil/tx.go NewTx 100.00% (1/1) -github.com/conformal/btcutil/tx.go Tx.SetIndex 100.00% (1/1) -github.com/conformal/btcutil/amount.go Amount.ToUnit 100.00% (1/1) -github.com/conformal/btcutil/tx.go Tx.Index 100.00% (1/1) -github.com/conformal/btcutil/amount.go Amount.String 100.00% (1/1) -github.com/conformal/btcutil/amount.go Amount.MulF64 100.00% (1/1) -github.com/conformal/btcutil/appdata.go appDataDir 92.00% (23/25) -github.com/conformal/btcutil/block.go Block.TxLoc 88.89% (8/9) -github.com/conformal/btcutil/block.go Block.Bytes 88.89% (8/9) -github.com/conformal/btcutil/address.go NewAddressPubKey 87.50% (7/8) -github.com/conformal/btcutil/address.go DecodeAddress 85.00% (17/20) -github.com/conformal/btcutil/wif.go DecodeWIF 85.00% (17/20) -github.com/conformal/btcutil/address.go AddressPubKey.serialize 80.00% (4/5) -github.com/conformal/btcutil/block.go Block.TxSha 75.00% (3/4) -github.com/conformal/btcutil/wif.go paddedAppend 66.67% (2/3) -github.com/conformal/btcutil/wif.go NewWIF 66.67% (2/3) -github.com/conformal/btcutil/certgen.go NewTLSCertPair 0.00% (0/54) -github.com/conformal/btcutil/wif.go WIF.SerializePubKey 0.00% (0/4) -github.com/conformal/btcutil/address.go AddressPubKey.AddressPubKeyHash 0.00% (0/3) -github.com/conformal/btcutil/address.go AddressPubKey.Format 0.00% (0/1) -github.com/conformal/btcutil/address.go AddressPubKey.PubKey 0.00% (0/1) -github.com/conformal/btcutil/address.go AddressPubKey.SetFormat 0.00% (0/1) -github.com/conformal/btcutil/wif.go WIF.IsForNet 0.00% (0/1) -github.com/conformal/btcutil/appdata.go AppDataDir 0.00% (0/1) -github.com/conformal/btcutil/net.go interfaceAddrs 0.00% (0/1) -github.com/conformal/btcutil ------------------------------- 75.88% (258/340) - diff --git a/tx.go b/tx.go index 5633fef..b3fef07 100644 --- a/tx.go +++ b/tx.go @@ -2,14 +2,14 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "bytes" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // TxIndexUnknown is the value returned for a transaction index that is unknown. diff --git a/tx_test.go b/tx_test.go index 6105b30..ca21521 100644 --- a/tx_test.go +++ b/tx_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil_test +package lbcutil_test import ( "bytes" @@ -10,15 +10,15 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcutil" "github.com/davecgh/go-spew/spew" ) // TestTx tests the API for Tx. func TestTx(t *testing.T) { testTx := Block100000.Transactions[0] - tx := btcutil.NewTx(testTx) + tx := lbcutil.NewTx(testTx) // Ensure we get the same data back out. if msgTx := tx.MsgTx(); !reflect.DeepEqual(msgTx, testTx) { @@ -63,7 +63,7 @@ func TestNewTxFromBytes(t *testing.T) { testTxBytes := testTxBuf.Bytes() // Create a new transaction from the serialized bytes. - tx, err := btcutil.NewTxFromBytes(testTxBytes) + tx, err := lbcutil.NewTxFromBytes(testTxBytes) if err != nil { t.Errorf("NewTxFromBytes: %v", err) return @@ -89,7 +89,7 @@ func TestTxErrors(t *testing.T) { // Truncate the transaction byte buffer to force errors. shortBytes := testTxBytes[:4] - _, err = btcutil.NewTxFromBytes(shortBytes) + _, err = lbcutil.NewTxFromBytes(shortBytes) if err != io.EOF { t.Errorf("NewTxFromBytes: did not get expected error - "+ "got %v, want %v", err, io.EOF) @@ -99,7 +99,7 @@ func TestTxErrors(t *testing.T) { // TestTxHasWitness tests the HasWitness() method. func TestTxHasWitness(t *testing.T) { msgTx := Block100000.Transactions[0] // contains witness data - tx := btcutil.NewTx(msgTx) + tx := lbcutil.NewTx(msgTx) tx.WitnessHash() // Populate the witness hash cache tx.HasWitness() // Should not fail (see btcsuite/btcd#1543) @@ -109,7 +109,7 @@ func TestTxHasWitness(t *testing.T) { } for _, msgTxWithoutWitness := range Block100000.Transactions[1:] { - txWithoutWitness := btcutil.NewTx(msgTxWithoutWitness) + txWithoutWitness := lbcutil.NewTx(msgTxWithoutWitness) if txWithoutWitness.HasWitness() { t.Errorf("HasWitness: got false, want true") } @@ -119,7 +119,7 @@ func TestTxHasWitness(t *testing.T) { // TestTxWitnessHash tests the WitnessHash() method. func TestTxWitnessHash(t *testing.T) { msgTx := Block100000.Transactions[0] // contains witness data - tx := btcutil.NewTx(msgTx) + tx := lbcutil.NewTx(msgTx) if tx.WitnessHash().IsEqual(tx.Hash()) { t.Errorf("WitnessHash: witness hash and tx id must NOT be same - "+ @@ -127,7 +127,7 @@ func TestTxWitnessHash(t *testing.T) { } for _, msgTxWithoutWitness := range Block100000.Transactions[1:] { - txWithoutWitness := btcutil.NewTx(msgTxWithoutWitness) + txWithoutWitness := lbcutil.NewTx(msgTxWithoutWitness) if !txWithoutWitness.WitnessHash().IsEqual(txWithoutWitness.Hash()) { t.Errorf("WitnessHash: witness hash and tx id must be same - "+ "got %v, want %v", txWithoutWitness.WitnessHash(), txWithoutWitness.Hash()) diff --git a/txsort/README.md b/txsort/README.md index bd410ec..b7615b2 100644 --- a/txsort/README.md +++ b/txsort/README.md @@ -1,9 +1,7 @@ txsort ====== -[![Build Status](http://img.shields.io/travis/btcsuite/btcutil.svg)](https://travis-ci.org/btcsuite/btcutil) [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org) -[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/btcsuite/btcutil/txsort) Package txsort provides the transaction sorting according to [BIP 69](https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki). @@ -17,15 +15,4 @@ then on the index as a tie breaker. The order for outputs is defined as first sorting on the amount and then on the raw public key script bytes as a tie breaker. -A comprehensive suite of tests is provided to ensure proper functionality. - -## Installation and Updating - -```bash -$ go get -u github.com/btcsuite/btcutil/txsort -``` - -## License - -Package txsort is licensed under the [copyfree](http://copyfree.org) ISC -License. +A comprehensive suite of tests is provided to ensure proper functionality. \ No newline at end of file diff --git a/txsort/txsort.go b/txsort/txsort.go index f72a7db..1dc7d2a 100644 --- a/txsort/txsort.go +++ b/txsort/txsort.go @@ -11,8 +11,8 @@ import ( "bytes" "sort" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // InPlaceSort modifies the passed transaction inputs and outputs to be sorted @@ -21,7 +21,7 @@ import ( // WARNING: This function must NOT be called with published transactions since // it will mutate the transaction if it's not already sorted. This can cause // issues if you mutate a tx in a block, for example, which would invalidate the -// block. It could also cause cached hashes, such as in a btcutil.Tx to become +// block. It could also cause cached hashes, such as in a lbcutil.Tx to become // invalidated. // // The function should only be used if the caller is creating the transaction or diff --git a/txsort/txsort_test.go b/txsort/txsort_test.go index 59f4d6c..7030521 100644 --- a/txsort/txsort_test.go +++ b/txsort/txsort_test.go @@ -11,8 +11,8 @@ import ( "path/filepath" "testing" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil/txsort" + "github.com/lbryio/lbcd/wire" + "github.com/lbryio/lbcutil/txsort" ) // TestSort ensures the transaction sorting works according to the BIP. diff --git a/wif.go b/wif.go index 8b17dc9..f36a8c2 100644 --- a/wif.go +++ b/wif.go @@ -2,16 +2,16 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil +package lbcutil import ( "bytes" "errors" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil/base58" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcutil/base58" ) // ErrMalformedPrivateKey describes an error where a WIF-encoded private diff --git a/wif_test.go b/wif_test.go index dec6dd6..d0b67c6 100644 --- a/wif_test.go +++ b/wif_test.go @@ -2,16 +2,16 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -package btcutil_test +package lbcutil_test import ( "bytes" "encoding/hex" "testing" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - . "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + . "github.com/lbryio/lbcutil" ) func TestEncodeDecodeWIF(t *testing.T) {