From 28a5e6fc6576993b1126035ccac48f8324072a3b Mon Sep 17 00:00:00 2001 From: Roy Lee Date: Thu, 14 Oct 2021 22:45:32 -0700 Subject: [PATCH] [lbry] rename btcd to lbcd Co-authored-by: Brannon King --- addrmgr/addrmanager.go | 4 +- addrmgr/addrmanager_internal_test.go | 2 +- addrmgr/addrmanager_test.go | 4 +- addrmgr/internal_test.go | 2 +- addrmgr/knownaddress.go | 2 +- addrmgr/knownaddress_test.go | 4 +- addrmgr/network.go | 2 +- addrmgr/network_test.go | 4 +- blockchain/accept.go | 4 +- blockchain/blockindex.go | 8 ++-- blockchain/chain.go | 14 +++---- blockchain/chain_test.go | 8 ++-- blockchain/chainio.go | 8 ++-- blockchain/chainio_test.go | 4 +- blockchain/chainview_test.go | 2 +- blockchain/checkpoints.go | 8 ++-- blockchain/claimtrie.go | 14 +++---- blockchain/common_test.go | 14 +++---- blockchain/compress.go | 4 +- blockchain/difficulty.go | 2 +- blockchain/example_test.go | 10 ++--- blockchain/fullblocks_test.go | 18 ++++----- blockchain/fullblocktests/generate.go | 14 +++---- blockchain/fullblocktests/params.go | 6 +-- blockchain/indexers/addrindex.go | 14 +++---- blockchain/indexers/addrindex_test.go | 2 +- blockchain/indexers/blocklogger.go | 2 +- blockchain/indexers/cfindex.go | 16 ++++---- blockchain/indexers/common.go | 6 +-- blockchain/indexers/manager.go | 10 ++--- blockchain/indexers/txindex.go | 10 ++--- blockchain/mediantime.go | 2 +- blockchain/merkle.go | 6 +-- blockchain/process.go | 6 +-- blockchain/scriptval.go | 6 +-- blockchain/scriptval_test.go | 2 +- blockchain/thresholdstate.go | 2 +- blockchain/thresholdstate_test.go | 2 +- blockchain/upgrade.go | 6 +-- blockchain/utxoviewpoint.go | 10 ++--- blockchain/validate.go | 10 ++--- blockchain/validate_test.go | 9 +++-- blockchain/versionbits.go | 2 +- blockchain/weight.go | 6 +-- btcec/example_test.go | 4 +- btcec/genprecomps.go | 2 +- btcjson/btcdextcmds_test.go | 2 +- btcjson/btcdextresults_test.go | 2 +- btcjson/btcwalletextcmds_test.go | 2 +- btcjson/chainsvrcmds.go | 2 +- btcjson/chainsvrcmds_test.go | 4 +- btcjson/chainsvrresults.go | 6 +-- btcjson/chainsvrresults_test.go | 6 +-- btcjson/chainsvrwscmds_test.go | 2 +- btcjson/chainsvrwsntfns_test.go | 2 +- btcjson/chainsvrwsresults_test.go | 2 +- btcjson/cmdinfo_test.go | 2 +- btcjson/cmdparse_test.go | 2 +- btcjson/error_test.go | 2 +- btcjson/example_test.go | 2 +- btcjson/help_test.go | 2 +- btcjson/helpers_test.go | 2 +- btcjson/jsonrpc_test.go | 2 +- btcjson/register_test.go | 2 +- btcjson/walletsvrcmds.go | 2 +- btcjson/walletsvrcmds_test.go | 4 +- btcjson/walletsvrresults.go | 2 +- btcjson/walletsvrresults_test.go | 2 +- btcjson/walletsvrwscmds_test.go | 2 +- btcjson/walletsvrwsntfns_test.go | 2 +- chaincfg/doc.go | 4 +- chaincfg/genesis.go | 4 +- chaincfg/params.go | 4 +- chaincfg/register_test.go | 2 +- cmd/addblock/addblock.go | 8 ++-- cmd/addblock/config.go | 16 ++++---- cmd/addblock/import.go | 12 +++--- cmd/findcheckpoint/config.go | 16 ++++---- cmd/findcheckpoint/findcheckpoint.go | 8 ++-- cmd/gencerts/gencerts.go | 2 +- cmd/{btcctl => lbcctl}/config.go | 20 +++++----- cmd/{btcctl => lbcctl}/httpclient.go | 2 +- cmd/{btcctl/btcctl.go => lbcctl/lbcctl.go} | 2 +- cmd/{btcctl => lbcctl}/version.go | 2 +- config.go | 38 +++++++++---------- config_test.go | 8 ++-- connmgr/seed.go | 4 +- database/cmd/dbtool/fetchblock.go | 4 +- database/cmd/dbtool/fetchblockregion.go | 4 +- database/cmd/dbtool/globalconfig.go | 16 ++++---- database/cmd/dbtool/insecureimport.go | 8 ++-- database/cmd/dbtool/loadheaders.go | 4 +- database/cmd/dbtool/main.go | 2 +- database/driver_test.go | 4 +- database/error_test.go | 2 +- database/example_test.go | 24 ++++++------ database/ffldb/bench_test.go | 6 +-- database/ffldb/blockio.go | 6 +-- database/ffldb/db.go | 10 ++--- database/ffldb/dbcache.go | 2 +- database/ffldb/doc.go | 2 +- database/ffldb/driver.go | 4 +- database/ffldb/driver_test.go | 8 ++-- database/ffldb/export_test.go | 2 +- database/ffldb/interface_test.go | 9 ++--- database/ffldb/ldbtreapiter.go | 2 +- database/ffldb/reconcile.go | 2 +- database/ffldb/whitebox_test.go | 7 ++-- database/interface.go | 4 +- doc.go | 10 ++--- docs/conf.py | 10 +++-- integration/bip0009_test.go | 8 ++-- integration/csv_fork_test.go | 16 ++++---- integration/rpcserver_test.go | 8 ++-- integration/rpctest/blockgen.go | 14 +++---- integration/rpctest/btcd.go | 6 +-- integration/rpctest/memwallet.go | 18 ++++----- integration/rpctest/node.go | 6 +-- integration/rpctest/rpc_harness.go | 12 +++--- integration/rpctest/rpc_harness_test.go | 10 ++--- integration/rpctest/utils.go | 4 +- btcd.go => lbcd.go | 8 ++-- log.go | 24 ++++++------ mempool/error.go | 4 +- mempool/estimatefee.go | 6 +-- mempool/estimatefee_test.go | 8 ++-- mempool/mempool.go | 18 ++++----- mempool/mempool_test.go | 14 +++---- mempool/policy.go | 9 +++-- mempool/policy_test.go | 12 +++--- mining/cpuminer/cpuminer.go | 12 +++--- mining/mining.go | 14 +++---- mining/mining_test.go | 2 +- mining/policy.go | 6 +-- mining/policy_test.go | 8 ++-- netsync/blocklogger.go | 2 +- netsync/interface.go | 14 +++---- netsync/manager.go | 16 ++++---- params.go | 4 +- peer/doc.go | 2 +- peer/example_test.go | 6 +-- peer/log.go | 6 +-- peer/peer.go | 8 ++-- peer/peer_test.go | 8 ++-- rpcadapters.go | 14 +++---- rpcclient/chain.go | 6 +-- rpcclient/doc.go | 2 +- rpcclient/example_test.go | 3 +- rpcclient/examples/bitcoincorehttp/main.go | 2 +- .../examples/bitcoincorehttpbulk/main.go | 2 +- rpcclient/examples/btcdwebsockets/main.go | 8 ++-- .../examples/btcwalletwebsockets/main.go | 8 ++-- rpcclient/extensions.go | 8 ++-- rpcclient/infrastructure.go | 16 ++++---- rpcclient/mining.go | 6 +-- rpcclient/net.go | 2 +- rpcclient/notify.go | 10 ++--- rpcclient/rawrequest.go | 2 +- rpcclient/rawtransactions.go | 8 ++-- rpcclient/wallet.go | 10 ++--- rpcserverhelp.go | 28 +++++++------- rpcwebsocket.go | 16 ++++---- server.go | 38 +++++++++---------- txscript/bench_test.go | 4 +- txscript/engine.go | 4 +- txscript/engine_test.go | 4 +- txscript/example_test.go | 12 +++--- txscript/hashcache.go | 4 +- txscript/hashcache_test.go | 2 +- txscript/opcode.go | 6 +-- txscript/pkscript.go | 8 ++-- txscript/pkscript_test.go | 2 +- txscript/reference_test.go | 6 +-- txscript/script.go | 4 +- txscript/script_test.go | 2 +- txscript/sigcache.go | 4 +- txscript/sigcache_test.go | 4 +- txscript/sign.go | 8 ++-- txscript/sign_test.go | 10 ++--- txscript/standard.go | 6 +-- txscript/standard_test.go | 6 +-- upgrade.go | 10 ++--- wire/bench_test.go | 2 +- wire/blockheader.go | 4 +- wire/common.go | 2 +- wire/common_test.go | 2 +- wire/invvect.go | 2 +- wire/invvect_test.go | 2 +- wire/message.go | 2 +- wire/message_test.go | 2 +- wire/msgblock.go | 2 +- wire/msgblock_test.go | 2 +- wire/msgcfcheckpt.go | 2 +- wire/msgcfheaders.go | 2 +- wire/msgcfilter.go | 2 +- wire/msggetblocks.go | 2 +- wire/msggetblocks_test.go | 2 +- wire/msggetcfcheckpt.go | 2 +- wire/msggetcfheaders.go | 2 +- wire/msggetcfilters.go | 2 +- wire/msggetdata_test.go | 2 +- wire/msggetheaders.go | 2 +- wire/msggetheaders_test.go | 2 +- wire/msginv_test.go | 2 +- wire/msgmerkleblock.go | 2 +- wire/msgmerkleblock_test.go | 2 +- wire/msgnotfound_test.go | 2 +- wire/msgreject.go | 2 +- wire/msgtx.go | 2 +- wire/msgtx_test.go | 2 +- 210 files changed, 666 insertions(+), 661 deletions(-) rename cmd/{btcctl => lbcctl}/config.go (95%) rename cmd/{btcctl => lbcctl}/httpclient.go (98%) rename cmd/{btcctl/btcctl.go => lbcctl/lbcctl.go} (99%) rename cmd/{btcctl => lbcctl}/version.go (99%) rename btcd.go => lbcd.go (98%) diff --git a/addrmgr/addrmanager.go b/addrmgr/addrmanager.go index 4c737b93..b7730671 100644 --- a/addrmgr/addrmanager.go +++ b/addrmgr/addrmanager.go @@ -23,8 +23,8 @@ import ( "sync/atomic" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // AddrManager provides a concurrency safe address manager for caching potential diff --git a/addrmgr/addrmanager_internal_test.go b/addrmgr/addrmanager_internal_test.go index 1c19dceb..b2f5f3d1 100644 --- a/addrmgr/addrmanager_internal_test.go +++ b/addrmgr/addrmanager_internal_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // randAddr generates a *wire.NetAddress backed by a random IPv4/IPv6 address. diff --git a/addrmgr/addrmanager_test.go b/addrmgr/addrmanager_test.go index 676913e2..d623479c 100644 --- a/addrmgr/addrmanager_test.go +++ b/addrmgr/addrmanager_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/addrmgr" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/addrmgr" + "github.com/lbryio/lbcd/wire" ) // naTest is used to describe a test to be performed against the NetAddressKey diff --git a/addrmgr/internal_test.go b/addrmgr/internal_test.go index e50e923c..b7c650c7 100644 --- a/addrmgr/internal_test.go +++ b/addrmgr/internal_test.go @@ -7,7 +7,7 @@ package addrmgr import ( "time" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) func TstKnownAddressIsBad(ka *KnownAddress) bool { diff --git a/addrmgr/knownaddress.go b/addrmgr/knownaddress.go index 5a7674f4..59db5584 100644 --- a/addrmgr/knownaddress.go +++ b/addrmgr/knownaddress.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // KnownAddress tracks information about a known network address that is used diff --git a/addrmgr/knownaddress_test.go b/addrmgr/knownaddress_test.go index a289d5a3..fc882667 100644 --- a/addrmgr/knownaddress_test.go +++ b/addrmgr/knownaddress_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/addrmgr" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/addrmgr" + "github.com/lbryio/lbcd/wire" ) func TestChance(t *testing.T) { diff --git a/addrmgr/network.go b/addrmgr/network.go index 51bfa3ed..878bc2b1 100644 --- a/addrmgr/network.go +++ b/addrmgr/network.go @@ -8,7 +8,7 @@ import ( "fmt" "net" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) var ( diff --git a/addrmgr/network_test.go b/addrmgr/network_test.go index 8af3369f..6f2565fe 100644 --- a/addrmgr/network_test.go +++ b/addrmgr/network_test.go @@ -8,8 +8,8 @@ import ( "net" "testing" - "github.com/btcsuite/btcd/addrmgr" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/addrmgr" + "github.com/lbryio/lbcd/wire" ) // TestIPTypes ensures the various functions which determine the type of an IP diff --git a/blockchain/accept.go b/blockchain/accept.go index f85d6558..6acba30d 100644 --- a/blockchain/accept.go +++ b/blockchain/accept.go @@ -7,8 +7,8 @@ package blockchain import ( "fmt" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/database" + btcutil "github.com/lbryio/lbcutil" ) // maybeAcceptBlock potentially accepts a block into the block chain and, if diff --git a/blockchain/blockindex.go b/blockchain/blockindex.go index 1531e6b1..eb7c01a7 100644 --- a/blockchain/blockindex.go +++ b/blockchain/blockindex.go @@ -10,10 +10,10 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" ) // blockStatus is a bit field representing the validation state of the block. diff --git a/blockchain/chain.go b/blockchain/chain.go index 8ffc4046..a0bfac6c 100644 --- a/blockchain/chain.go +++ b/blockchain/chain.go @@ -11,14 +11,14 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" - "github.com/btcsuite/btcd/claimtrie" + "github.com/lbryio/lbcd/claimtrie" ) const ( diff --git a/blockchain/chain_test.go b/blockchain/chain_test.go index 7de323bc..b2a155bc 100644 --- a/blockchain/chain_test.go +++ b/blockchain/chain_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // TestHaveBlock tests the HaveBlock API to ensure proper functionality. diff --git a/blockchain/chainio.go b/blockchain/chainio.go index f40ba465..ae83dc64 100644 --- a/blockchain/chainio.go +++ b/blockchain/chainio.go @@ -12,10 +12,10 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/chainio_test.go b/blockchain/chainio_test.go index 630af14e..76881a33 100644 --- a/blockchain/chainio_test.go +++ b/blockchain/chainio_test.go @@ -11,8 +11,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" ) // TestErrNotInMainChain ensures the functions related to errNotInMainChain work diff --git a/blockchain/chainview_test.go b/blockchain/chainview_test.go index c59004fd..746bf1bd 100644 --- a/blockchain/chainview_test.go +++ b/blockchain/chainview_test.go @@ -10,7 +10,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // testNoncePrng provides a deterministic prng for the nonce in generated fake diff --git a/blockchain/checkpoints.go b/blockchain/checkpoints.go index af3b6d92..a82d70dd 100644 --- a/blockchain/checkpoints.go +++ b/blockchain/checkpoints.go @@ -8,10 +8,10 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + btcutil "github.com/lbryio/lbcutil" ) // CheckpointConfirmations is the number of blocks before the end of the current diff --git a/blockchain/claimtrie.go b/blockchain/claimtrie.go index de349b3d..b9913203 100644 --- a/blockchain/claimtrie.go +++ b/blockchain/claimtrie.go @@ -6,14 +6,14 @@ import ( "github.com/pkg/errors" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" - "github.com/btcsuite/btcd/claimtrie" - "github.com/btcsuite/btcd/claimtrie/change" - "github.com/btcsuite/btcd/claimtrie/node" - "github.com/btcsuite/btcd/claimtrie/normalization" + "github.com/lbryio/lbcd/claimtrie" + "github.com/lbryio/lbcd/claimtrie/change" + "github.com/lbryio/lbcd/claimtrie/node" + "github.com/lbryio/lbcd/claimtrie/normalization" ) func (b *BlockChain) SetClaimtrieHeader(block *btcutil.Block, view *UtxoViewpoint) error { diff --git a/blockchain/common_test.go b/blockchain/common_test.go index dd392a66..16ad6756 100644 --- a/blockchain/common_test.go +++ b/blockchain/common_test.go @@ -14,13 +14,13 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/compress.go b/blockchain/compress.go index 611b9f09..70aab39b 100644 --- a/blockchain/compress.go +++ b/blockchain/compress.go @@ -5,8 +5,8 @@ package blockchain import ( - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/txscript" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/txscript" ) // ----------------------------------------------------------------------------- diff --git a/blockchain/difficulty.go b/blockchain/difficulty.go index 3eae3844..2f16e2e5 100644 --- a/blockchain/difficulty.go +++ b/blockchain/difficulty.go @@ -8,7 +8,7 @@ import ( "math/big" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) var ( diff --git a/blockchain/example_test.go b/blockchain/example_test.go index 691d0927..da0cce79 100644 --- a/blockchain/example_test.go +++ b/blockchain/example_test.go @@ -10,11 +10,11 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + btcutil "github.com/lbryio/lbcutil" ) // This example demonstrates how to create a new chain instance and use diff --git a/blockchain/fullblocks_test.go b/blockchain/fullblocks_test.go index 3ae0d0eb..4c45c099 100644 --- a/blockchain/fullblocks_test.go +++ b/blockchain/fullblocks_test.go @@ -12,15 +12,15 @@ import ( "path/filepath" "testing" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/blockchain/fullblocktests" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/blockchain/fullblocktests" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/fullblocktests/generate.go b/blockchain/fullblocktests/generate.go index 592a14de..dc182a90 100644 --- a/blockchain/fullblocktests/generate.go +++ b/blockchain/fullblocktests/generate.go @@ -18,13 +18,13 @@ import ( "runtime" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcec" - "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/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/fullblocktests/params.go b/blockchain/fullblocktests/params.go index 4679036f..fa23e841 100644 --- a/blockchain/fullblocktests/params.go +++ b/blockchain/fullblocktests/params.go @@ -9,9 +9,9 @@ import ( "math/big" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // newHashFromStr converts the passed big-endian hex string into a diff --git a/blockchain/indexers/addrindex.go b/blockchain/indexers/addrindex.go index 4a9bf4ec..3ac3924a 100644 --- a/blockchain/indexers/addrindex.go +++ b/blockchain/indexers/addrindex.go @@ -9,13 +9,13 @@ import ( "fmt" "sync" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/indexers/addrindex_test.go b/blockchain/indexers/addrindex_test.go index e545887f..584ed1cc 100644 --- a/blockchain/indexers/addrindex_test.go +++ b/blockchain/indexers/addrindex_test.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // addrIndexBucket provides a mock address index database bucket by implementing diff --git a/blockchain/indexers/blocklogger.go b/blockchain/indexers/blocklogger.go index 88d6f269..845618e7 100644 --- a/blockchain/indexers/blocklogger.go +++ b/blockchain/indexers/blocklogger.go @@ -9,7 +9,7 @@ import ( "time" "github.com/btcsuite/btclog" - "github.com/btcsuite/btcutil" + btcutil "github.com/lbryio/lbcutil" ) // blockProgressLogger provides periodic logging for other services in order diff --git a/blockchain/indexers/cfindex.go b/blockchain/indexers/cfindex.go index 8ea14728..881d3a30 100644 --- a/blockchain/indexers/cfindex.go +++ b/blockchain/indexers/cfindex.go @@ -7,14 +7,14 @@ package indexers import ( "errors" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/gcs" - "github.com/btcsuite/btcutil/gcs/builder" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/gcs" + "github.com/lbryio/lbcutil/gcs/builder" ) const ( diff --git a/blockchain/indexers/common.go b/blockchain/indexers/common.go index a912bb4c..57971d8b 100644 --- a/blockchain/indexers/common.go +++ b/blockchain/indexers/common.go @@ -11,9 +11,9 @@ import ( "encoding/binary" "errors" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/database" + btcutil "github.com/lbryio/lbcutil" ) var ( diff --git a/blockchain/indexers/manager.go b/blockchain/indexers/manager.go index bc0804f8..7c0bb0e1 100644 --- a/blockchain/indexers/manager.go +++ b/blockchain/indexers/manager.go @@ -8,11 +8,11 @@ import ( "bytes" "fmt" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) var ( diff --git a/blockchain/indexers/txindex.go b/blockchain/indexers/txindex.go index 00cfd006..96b3edcb 100644 --- a/blockchain/indexers/txindex.go +++ b/blockchain/indexers/txindex.go @@ -8,11 +8,11 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/mediantime.go b/blockchain/mediantime.go index f9c15a23..bb85b646 100644 --- a/blockchain/mediantime.go +++ b/blockchain/mediantime.go @@ -183,7 +183,7 @@ func (m *medianTime) AddTimeSample(sourceID string, timeVal time.Time) { // Warn if none of the time samples are close. if !remoteHasCloseTime { log.Warnf("Please check your date and time " + - "are correct! btcd will not work " + + "are correct! lbcd will not work " + "properly with an invalid time") } } diff --git a/blockchain/merkle.go b/blockchain/merkle.go index 8f3f6b97..29479c1d 100644 --- a/blockchain/merkle.go +++ b/blockchain/merkle.go @@ -9,9 +9,9 @@ import ( "fmt" "math" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/process.go b/blockchain/process.go index 6d2161bb..a48b6e50 100644 --- a/blockchain/process.go +++ b/blockchain/process.go @@ -8,9 +8,9 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + btcutil "github.com/lbryio/lbcutil" ) // BehaviorFlags is a bitmask defining tweaks to the normal behavior when diff --git a/blockchain/scriptval.go b/blockchain/scriptval.go index 8ba59a42..97bf0ece 100644 --- a/blockchain/scriptval.go +++ b/blockchain/scriptval.go @@ -10,9 +10,9 @@ import ( "runtime" "time" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // txValidateItem holds a transaction along with which input to validate. diff --git a/blockchain/scriptval_test.go b/blockchain/scriptval_test.go index 031f0480..62d97362 100644 --- a/blockchain/scriptval_test.go +++ b/blockchain/scriptval_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/txscript" + "github.com/lbryio/lbcd/txscript" ) // TestCheckBlockScripts ensures that validating the all of the scripts in a diff --git a/blockchain/thresholdstate.go b/blockchain/thresholdstate.go index 8a79f968..ac652eff 100644 --- a/blockchain/thresholdstate.go +++ b/blockchain/thresholdstate.go @@ -7,7 +7,7 @@ package blockchain import ( "fmt" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // ThresholdState define the various threshold states used when voting on diff --git a/blockchain/thresholdstate_test.go b/blockchain/thresholdstate_test.go index c65f5a44..5eecc61e 100644 --- a/blockchain/thresholdstate_test.go +++ b/blockchain/thresholdstate_test.go @@ -7,7 +7,7 @@ package blockchain import ( "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestThresholdStateStringer tests the stringized output for the diff --git a/blockchain/upgrade.go b/blockchain/upgrade.go index 253ca62e..a899cb4e 100644 --- a/blockchain/upgrade.go +++ b/blockchain/upgrade.go @@ -11,9 +11,9 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" ) const ( diff --git a/blockchain/utxoviewpoint.go b/blockchain/utxoviewpoint.go index b8576581..60d48df0 100644 --- a/blockchain/utxoviewpoint.go +++ b/blockchain/utxoviewpoint.go @@ -7,11 +7,11 @@ package blockchain import ( "fmt" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // txoFlags is a bitmask defining additional information and state for a diff --git a/blockchain/validate.go b/blockchain/validate.go index ef2c283b..19183aa9 100644 --- a/blockchain/validate.go +++ b/blockchain/validate.go @@ -11,11 +11,11 @@ import ( "math/big" "time" - "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/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/blockchain/validate_test.go b/blockchain/validate_test.go index 9bf2ff42..6298ad06 100644 --- a/blockchain/validate_test.go +++ b/blockchain/validate_test.go @@ -5,15 +5,16 @@ package blockchain import ( + "encoding/hex" "math" "reflect" "testing" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // TestSequenceLocksActive tests the SequenceLockActive function to ensure it diff --git a/blockchain/versionbits.go b/blockchain/versionbits.go index acdbf144..ddf1cace 100644 --- a/blockchain/versionbits.go +++ b/blockchain/versionbits.go @@ -7,7 +7,7 @@ package blockchain import ( "math" - "github.com/btcsuite/btcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg" ) const ( diff --git a/blockchain/weight.go b/blockchain/weight.go index e23dd87d..9a3a10b3 100644 --- a/blockchain/weight.go +++ b/blockchain/weight.go @@ -7,9 +7,9 @@ package blockchain import ( "fmt" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/btcec/example_test.go b/btcec/example_test.go index ca51ee87..cea8d771 100644 --- a/btcec/example_test.go +++ b/btcec/example_test.go @@ -8,8 +8,8 @@ import ( "encoding/hex" "fmt" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // This example demonstrates signing a message with a secp256k1 private key that diff --git a/btcec/genprecomps.go b/btcec/genprecomps.go index d4a9c1b8..f09ab311 100644 --- a/btcec/genprecomps.go +++ b/btcec/genprecomps.go @@ -17,7 +17,7 @@ import ( "log" "os" - "github.com/btcsuite/btcd/btcec" + "github.com/lbryio/lbcd/btcec" ) func main() { diff --git a/btcjson/btcdextcmds_test.go b/btcjson/btcdextcmds_test.go index aaa44144..8aadb0af 100644 --- a/btcjson/btcdextcmds_test.go +++ b/btcjson/btcdextcmds_test.go @@ -12,7 +12,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestBtcdExtCmds tests all of the btcd extended commands marshal and unmarshal diff --git a/btcjson/btcdextresults_test.go b/btcjson/btcdextresults_test.go index 478f088c..55327dce 100644 --- a/btcjson/btcdextresults_test.go +++ b/btcjson/btcdextresults_test.go @@ -9,7 +9,7 @@ import ( "encoding/json" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestBtcdExtCustomResults ensures any results that have custom marshalling diff --git a/btcjson/btcwalletextcmds_test.go b/btcjson/btcwalletextcmds_test.go index dea1c614..fe3b54c0 100644 --- a/btcjson/btcwalletextcmds_test.go +++ b/btcjson/btcwalletextcmds_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestBtcWalletExtCmds tests all of the btcwallet extended commands marshal and diff --git a/btcjson/chainsvrcmds.go b/btcjson/chainsvrcmds.go index aa1d4415..0cfb2e17 100644 --- a/btcjson/chainsvrcmds.go +++ b/btcjson/chainsvrcmds.go @@ -13,7 +13,7 @@ import ( "fmt" "reflect" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // AddNodeSubCmd defines the type used in the addnode JSON-RPC command for the diff --git a/btcjson/chainsvrcmds_test.go b/btcjson/chainsvrcmds_test.go index 7d3a68dc..fa8305c2 100644 --- a/btcjson/chainsvrcmds_test.go +++ b/btcjson/chainsvrcmds_test.go @@ -12,8 +12,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/wire" ) // TestChainSvrCmds tests all of the chain server commands marshal and unmarshal diff --git a/btcjson/chainsvrresults.go b/btcjson/chainsvrresults.go index 405fd867..e658cccf 100644 --- a/btcjson/chainsvrresults.go +++ b/btcjson/chainsvrresults.go @@ -9,10 +9,10 @@ import ( "encoding/hex" "encoding/json" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // GetBlockHeaderVerboseResult models the data from the getblockheader command when diff --git a/btcjson/chainsvrresults_test.go b/btcjson/chainsvrresults_test.go index 72dcd8d7..bb04a003 100644 --- a/btcjson/chainsvrresults_test.go +++ b/btcjson/chainsvrresults_test.go @@ -9,10 +9,10 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg/chainhash" + btcutil "github.com/lbryio/lbcutil" ) // TestChainSvrCustomResults ensures any results that have custom marshalling diff --git a/btcjson/chainsvrwscmds_test.go b/btcjson/chainsvrwscmds_test.go index 03fb22c8..688c3900 100644 --- a/btcjson/chainsvrwscmds_test.go +++ b/btcjson/chainsvrwscmds_test.go @@ -12,7 +12,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestChainSvrWsCmds tests all of the chain server websocket-specific commands diff --git a/btcjson/chainsvrwsntfns_test.go b/btcjson/chainsvrwsntfns_test.go index e2b234c2..ed6902dc 100644 --- a/btcjson/chainsvrwsntfns_test.go +++ b/btcjson/chainsvrwsntfns_test.go @@ -12,7 +12,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestChainSvrWsNtfns tests all of the chain server websocket-specific diff --git a/btcjson/chainsvrwsresults_test.go b/btcjson/chainsvrwsresults_test.go index b1e17450..21e1f2ff 100644 --- a/btcjson/chainsvrwsresults_test.go +++ b/btcjson/chainsvrwsresults_test.go @@ -9,7 +9,7 @@ import ( "encoding/json" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestChainSvrWsResults ensures any results that have custom marshalling diff --git a/btcjson/cmdinfo_test.go b/btcjson/cmdinfo_test.go index 61a693e4..2d7e7ec4 100644 --- a/btcjson/cmdinfo_test.go +++ b/btcjson/cmdinfo_test.go @@ -8,7 +8,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestCmdMethod tests the CmdMethod function to ensure it retunrs the expected diff --git a/btcjson/cmdparse_test.go b/btcjson/cmdparse_test.go index f2585edf..c1414c64 100644 --- a/btcjson/cmdparse_test.go +++ b/btcjson/cmdparse_test.go @@ -10,7 +10,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestAssignField tests the assignField function handles supported combinations diff --git a/btcjson/error_test.go b/btcjson/error_test.go index 8eb93c75..d1f5cb98 100644 --- a/btcjson/error_test.go +++ b/btcjson/error_test.go @@ -7,7 +7,7 @@ package btcjson_test import ( "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestErrorCodeStringer tests the stringized output for the ErrorCode type. diff --git a/btcjson/example_test.go b/btcjson/example_test.go index 74478e74..7974ba0e 100644 --- a/btcjson/example_test.go +++ b/btcjson/example_test.go @@ -8,7 +8,7 @@ import ( "encoding/json" "fmt" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // This example demonstrates how to create and marshal a command into a JSON-RPC diff --git a/btcjson/help_test.go b/btcjson/help_test.go index 918aa144..87ad7f7e 100644 --- a/btcjson/help_test.go +++ b/btcjson/help_test.go @@ -8,7 +8,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestHelpReflectInternals ensures the various help functions which deal with diff --git a/btcjson/helpers_test.go b/btcjson/helpers_test.go index 7bcaf4bc..9023c2e4 100644 --- a/btcjson/helpers_test.go +++ b/btcjson/helpers_test.go @@ -8,7 +8,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestHelpers tests the various helper functions which create pointers to diff --git a/btcjson/jsonrpc_test.go b/btcjson/jsonrpc_test.go index 13d98e89..b7229d35 100644 --- a/btcjson/jsonrpc_test.go +++ b/btcjson/jsonrpc_test.go @@ -9,7 +9,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestIsValidIDType ensures the IsValidIDType function behaves as expected. diff --git a/btcjson/register_test.go b/btcjson/register_test.go index 2d3ab10f..45e7238c 100644 --- a/btcjson/register_test.go +++ b/btcjson/register_test.go @@ -9,7 +9,7 @@ import ( "sort" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestUsageFlagStringer tests the stringized output for the UsageFlag type. diff --git a/btcjson/walletsvrcmds.go b/btcjson/walletsvrcmds.go index e8ed6237..e4d676ff 100644 --- a/btcjson/walletsvrcmds.go +++ b/btcjson/walletsvrcmds.go @@ -12,7 +12,7 @@ import ( "encoding/json" "fmt" - "github.com/btcsuite/btcutil" + btcutil "github.com/lbryio/lbcutil" ) // AddMultisigAddressCmd defines the addmutisigaddress JSON-RPC command. diff --git a/btcjson/walletsvrcmds_test.go b/btcjson/walletsvrcmds_test.go index 9c68d260..d33888d4 100644 --- a/btcjson/walletsvrcmds_test.go +++ b/btcjson/walletsvrcmds_test.go @@ -11,8 +11,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcjson" + btcutil "github.com/lbryio/lbcutil" ) // TestWalletSvrCmds tests all of the wallet server commands marshal and diff --git a/btcjson/walletsvrresults.go b/btcjson/walletsvrresults.go index 78a6e647..16df09bb 100644 --- a/btcjson/walletsvrresults.go +++ b/btcjson/walletsvrresults.go @@ -8,7 +8,7 @@ import ( "encoding/json" "fmt" - "github.com/btcsuite/btcd/txscript" + "github.com/lbryio/lbcd/txscript" ) // CreateWalletResult models the result of the createwallet command. diff --git a/btcjson/walletsvrresults_test.go b/btcjson/walletsvrresults_test.go index fd44b066..510c367c 100644 --- a/btcjson/walletsvrresults_test.go +++ b/btcjson/walletsvrresults_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/txscript" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/txscript" ) // TestGetAddressInfoResult ensures that custom unmarshalling of diff --git a/btcjson/walletsvrwscmds_test.go b/btcjson/walletsvrwscmds_test.go index 110a893b..3c9751fc 100644 --- a/btcjson/walletsvrwscmds_test.go +++ b/btcjson/walletsvrwscmds_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestWalletSvrWsCmds tests all of the wallet server websocket-specific diff --git a/btcjson/walletsvrwsntfns_test.go b/btcjson/walletsvrwsntfns_test.go index 11191662..51839c68 100644 --- a/btcjson/walletsvrwsntfns_test.go +++ b/btcjson/walletsvrwsntfns_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // TestWalletSvrWsNtfns tests all of the chain server websocket-specific diff --git a/chaincfg/doc.go b/chaincfg/doc.go index 3659adbf..fb5fa677 100644 --- a/chaincfg/doc.go +++ b/chaincfg/doc.go @@ -25,8 +25,8 @@ // "fmt" // "log" // -// "github.com/btcsuite/btcutil" -// "github.com/btcsuite/btcd/chaincfg" +// btcutil "github.com/lbryio/lbcutil" +// "github.com/lbryio/lbcd/chaincfg" // ) // // var testnet = flag.Bool("testnet", false, "operate on the testnet Bitcoin network") diff --git a/chaincfg/genesis.go b/chaincfg/genesis.go index 2c2a043e..a4df289d 100644 --- a/chaincfg/genesis.go +++ b/chaincfg/genesis.go @@ -7,8 +7,8 @@ package chaincfg import ( "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // genesisCoinbaseTx is the coinbase transaction for the genesis blocks for diff --git a/chaincfg/params.go b/chaincfg/params.go index 68c362d5..b2144963 100644 --- a/chaincfg/params.go +++ b/chaincfg/params.go @@ -13,8 +13,8 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // These variables are the chain proof-of-work limit parameters for each default diff --git a/chaincfg/register_test.go b/chaincfg/register_test.go index bcb5b3c6..700a63ff 100644 --- a/chaincfg/register_test.go +++ b/chaincfg/register_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - . "github.com/btcsuite/btcd/chaincfg" + . "github.com/lbryio/lbcd/chaincfg" ) // Define some of the required parameters for a user-registered diff --git a/cmd/addblock/addblock.go b/cmd/addblock/addblock.go index 8b44f307..b601779b 100644 --- a/cmd/addblock/addblock.go +++ b/cmd/addblock/addblock.go @@ -8,11 +8,11 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/blockchain/indexers" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/limits" "github.com/btcsuite/btclog" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/blockchain/indexers" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/limits" ) const ( diff --git a/cmd/addblock/config.go b/cmd/addblock/config.go index 90620c8f..d2c9dc0d 100644 --- a/cmd/addblock/config.go +++ b/cmd/addblock/config.go @@ -9,12 +9,12 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" flags "github.com/jessevdk/go-flags" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( @@ -24,7 +24,7 @@ const ( ) var ( - btcdHomeDir = btcutil.AppDataDir("btcd", false) + btcdHomeDir = btcutil.AppDataDir("lbcd", false) defaultDataDir = filepath.Join(btcdHomeDir, "data") knownDbTypes = database.SupportedDrivers() activeNetParams = &chaincfg.MainNetParams @@ -35,7 +35,7 @@ var ( // See loadConfig for details on the configuration load process. type config struct { AddrIndex bool `long:"addrindex" description:"Build a full address-based transaction index which makes the searchrawtransactions RPC available"` - DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"` + DataDir string `short:"b" long:"datadir" description:"Location of the lbcd data directory"` DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"` InFile string `short:"i" long:"infile" description:"File containing the block(s)"` Progress int `short:"p" long:"progress" description:"Show a progress message each time this number of seconds have passed -- Use 0 to disable progress announcements"` @@ -67,7 +67,7 @@ func validDbType(dbType string) bool { } // netName returns the name used when referring to a bitcoin network. At the -// time of writing, btcd currently places blocks for testnet version 3 in the +// time of writing, lbcd currently places blocks for testnet version 3 in the // data and log directory "testnet", which does not match the Name field of the // chaincfg parameters. This function can be used to override this directory name // as "testnet" when the passed active network matches wire.TestNet3. diff --git a/cmd/addblock/import.go b/cmd/addblock/import.go index b7a30369..34117ecd 100644 --- a/cmd/addblock/import.go +++ b/cmd/addblock/import.go @@ -11,12 +11,12 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/blockchain/indexers" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/blockchain/indexers" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) var zeroHash = chainhash.Hash{} diff --git a/cmd/findcheckpoint/config.go b/cmd/findcheckpoint/config.go index 87f04cec..7a16069a 100644 --- a/cmd/findcheckpoint/config.go +++ b/cmd/findcheckpoint/config.go @@ -9,12 +9,12 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" flags "github.com/jessevdk/go-flags" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( @@ -25,7 +25,7 @@ const ( ) var ( - btcdHomeDir = btcutil.AppDataDir("btcd", false) + btcdHomeDir = btcutil.AppDataDir("lbcd", false) defaultDataDir = filepath.Join(btcdHomeDir, "data") knownDbTypes = database.SupportedDrivers() activeNetParams = &chaincfg.MainNetParams @@ -35,7 +35,7 @@ var ( // // See loadConfig for details on the configuration load process. type config struct { - DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"` + DataDir string `short:"b" long:"datadir" description:"Location of the lbcd data directory"` DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"` UseGoOutput bool `short:"g" long:"gooutput" description:"Display the candidates using Go syntax that is ready to insert into the btcchain checkpoint list"` NumCandidates int `short:"n" long:"numcandidates" description:"Max num of checkpoint candidates to show {1-20}"` @@ -56,7 +56,7 @@ func validDbType(dbType string) bool { } // netName returns the name used when referring to a bitcoin network. At the -// time of writing, btcd currently places blocks for testnet version 3 in the +// time of writing, lbcd currently places blocks for testnet version 3 in the // data and log directory "testnet", which does not match the Name field of the // chaincfg parameters. This function can be used to override this directory name // as "testnet" when the passed active network matches wire.TestNet3. diff --git a/cmd/findcheckpoint/findcheckpoint.go b/cmd/findcheckpoint/findcheckpoint.go index ec4a4b30..ae307148 100644 --- a/cmd/findcheckpoint/findcheckpoint.go +++ b/cmd/findcheckpoint/findcheckpoint.go @@ -9,10 +9,10 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" ) const blockDbNamePrefix = "blocks" diff --git a/cmd/gencerts/gencerts.go b/cmd/gencerts/gencerts.go index 27d1073e..3bce5d17 100644 --- a/cmd/gencerts/gencerts.go +++ b/cmd/gencerts/gencerts.go @@ -12,8 +12,8 @@ import ( "strings" "time" - "github.com/btcsuite/btcutil" flags "github.com/jessevdk/go-flags" + btcutil "github.com/lbryio/lbcutil" ) type config struct { diff --git a/cmd/btcctl/config.go b/cmd/lbcctl/config.go similarity index 95% rename from cmd/btcctl/config.go rename to cmd/lbcctl/config.go index 1cc2a260..e00cac77 100644 --- a/cmd/btcctl/config.go +++ b/cmd/lbcctl/config.go @@ -13,10 +13,10 @@ import ( "regexp" "strings" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcutil" flags "github.com/jessevdk/go-flags" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg" + btcutil "github.com/lbryio/lbcutil" ) const ( @@ -27,10 +27,10 @@ const ( ) var ( - btcdHomeDir = btcutil.AppDataDir("btcd", false) - btcctlHomeDir = btcutil.AppDataDir("btcctl", false) - btcwalletHomeDir = btcutil.AppDataDir("btcwallet", false) - defaultConfigFile = filepath.Join(btcctlHomeDir, "btcctl.conf") + btcdHomeDir = btcutil.AppDataDir("lbcd", false) + btcctlHomeDir = btcutil.AppDataDir("lbcctl", false) + btcwalletHomeDir = btcutil.AppDataDir("lbcwallet", false) + defaultConfigFile = filepath.Join(btcctlHomeDir, "lbcctl.conf") defaultRPCServer = "localhost" defaultRPCCertFile = filepath.Join(btcdHomeDir, "rpc.cert") defaultWalletCertFile = filepath.Join(btcwalletHomeDir, "rpc.cert") @@ -137,7 +137,7 @@ func normalizeAddress(addr string, chain *chaincfg.Params, useWallet bool) (stri paramErr := fmt.Errorf("cannot use -wallet with -regtest, btcwallet not yet compatible with regtest") return "", paramErr } else { - defaultPort = "18334" + defaultPort = "29245" } case &chaincfg.SigNetParams: if useWallet { @@ -231,9 +231,9 @@ func loadConfig() (*config, []string, error) { // Use config file for RPC server to create default btcctl config var serverConfigPath string if preCfg.Wallet { - serverConfigPath = filepath.Join(btcwalletHomeDir, "btcwallet.conf") + serverConfigPath = filepath.Join(btcwalletHomeDir, "lbcwallet.conf") } else { - serverConfigPath = filepath.Join(btcdHomeDir, "btcd.conf") + serverConfigPath = filepath.Join(btcdHomeDir, "lbcd.conf") } err := createDefaultConfigFile(preCfg.ConfigFile, serverConfigPath) diff --git a/cmd/btcctl/httpclient.go b/cmd/lbcctl/httpclient.go similarity index 98% rename from cmd/btcctl/httpclient.go rename to cmd/lbcctl/httpclient.go index 2a0f6dff..e7ffd205 100644 --- a/cmd/btcctl/httpclient.go +++ b/cmd/lbcctl/httpclient.go @@ -10,8 +10,8 @@ import ( "net" "net/http" - "github.com/btcsuite/btcd/btcjson" "github.com/btcsuite/go-socks/socks" + "github.com/lbryio/lbcd/btcjson" ) // newHTTPClient returns a new HTTP client that is configured according to the diff --git a/cmd/btcctl/btcctl.go b/cmd/lbcctl/lbcctl.go similarity index 99% rename from cmd/btcctl/btcctl.go rename to cmd/lbcctl/lbcctl.go index 771d5f7e..79349186 100644 --- a/cmd/btcctl/btcctl.go +++ b/cmd/lbcctl/lbcctl.go @@ -10,7 +10,7 @@ import ( "path/filepath" "strings" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) const ( diff --git a/cmd/btcctl/version.go b/cmd/lbcctl/version.go similarity index 99% rename from cmd/btcctl/version.go rename to cmd/lbcctl/version.go index edb42dbe..fcd70ce4 100644 --- a/cmd/btcctl/version.go +++ b/cmd/lbcctl/version.go @@ -18,7 +18,7 @@ const semanticAlphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqr const ( appMajor uint = 0 appMinor uint = 22 - appPatch uint = 0 + appPatch uint = 100 // appPreRelease MUST only contain characters from semanticAlphabet // per the semantic versioning spec. diff --git a/config.go b/config.go index 156084bc..748a626d 100644 --- a/config.go +++ b/config.go @@ -21,26 +21,26 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/connmgr" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/mempool" - "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" "github.com/btcsuite/go-socks/socks" flags "github.com/jessevdk/go-flags" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/connmgr" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + "github.com/lbryio/lbcd/mempool" + "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( - defaultConfigFilename = "btcd.conf" + defaultConfigFilename = "lbcd.conf" defaultDataDirname = "data" defaultLogLevel = "info" defaultLogDirname = "logs" - defaultLogFilename = "btcd.log" + defaultLogFilename = "lbcd.log" defaultMaxPeers = 125 defaultBanDuration = time.Hour * 24 defaultBanThreshold = 100 @@ -63,13 +63,13 @@ const ( defaultMaxOrphanTransactions = 100 defaultMaxOrphanTxSize = 100000 defaultSigCacheMaxSize = 100000 - sampleConfigFilename = "sample-btcd.conf" + sampleConfigFilename = "sample-lbcd.conf" defaultTxIndex = false defaultAddrIndex = false ) var ( - defaultHomeDir = btcutil.AppDataDir("btcd", false) + defaultHomeDir = btcutil.AppDataDir("lbcd", false) defaultConfigFile = filepath.Join(defaultHomeDir, defaultConfigFilename) defaultDataDir = filepath.Join(defaultHomeDir, defaultDataDirname) knownDbTypes = database.SupportedDrivers() @@ -98,8 +98,8 @@ type config struct { AddCheckpoints []string `long:"addcheckpoint" description:"Add a custom checkpoint. Format: ':'"` AddPeers []string `short:"a" long:"addpeer" description:"Add a peer to connect with at startup"` AddrIndex bool `long:"addrindex" description:"Maintain a full address-based transaction index which makes the searchrawtransactions RPC available"` - AgentBlacklist []string `long:"agentblacklist" description:"A comma separated list of user-agent substrings which will cause btcd to reject any peers whose user-agent contains any of the blacklisted substrings."` - AgentWhitelist []string `long:"agentwhitelist" description:"A comma separated list of user-agent substrings which will cause btcd to require all peers' user-agents to contain one of the whitelisted substrings. The blacklist is applied before the blacklist, and an empty whitelist will allow all agents that do not fail the blacklist."` + AgentBlacklist []string `long:"agentblacklist" description:"A comma separated list of user-agent substrings which will cause lbcd to reject any peers whose user-agent contains any of the blacklisted substrings."` + AgentWhitelist []string `long:"agentwhitelist" description:"A comma separated list of user-agent substrings which will cause lbcd to require all peers' user-agents to contain one of the whitelisted substrings. The blacklist is applied before the blacklist, and an empty whitelist will allow all agents that do not fail the blacklist."` BanDuration time.Duration `long:"banduration" description:"How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second"` BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."` BlockMaxSize uint32 `long:"blockmaxsize" description:"Maximum block size in bytes to be used when creating a block"` @@ -125,7 +125,7 @@ type config struct { MaxOrphanTxs int `long:"maxorphantx" description:"Max number of orphan transactions to keep in memory"` MaxPeers int `long:"maxpeers" description:"Max number of inbound and outbound peers"` MiningAddrs []string `long:"miningaddr" description:"Add the specified payment address to the list of addresses to use for generated blocks -- At least one address is required if the generate option is set"` - MinRelayTxFee float64 `long:"minrelaytxfee" description:"The minimum transaction fee in BTC/kB to be considered a non-zero fee."` + MinRelayTxFee float64 `long:"minrelaytxfee" description:"The minimum transaction fee in LBC/kB to be considered a non-zero fee."` DisableBanning bool `long:"nobanning" description:"Disable banning of misbehaving peers"` NoCFilters bool `long:"nocfilters" description:"Disable committed filtering (CF) support"` DisableCheckpoints bool `long:"nocheckpoints" description:"Disable built-in checkpoints. Don't do this unless you know what you're doing."` @@ -407,7 +407,7 @@ func newConfigParser(cfg *config, so *serviceOptions, options flags.Options) *fl // 3) Load configuration file overwriting defaults with any specified options // 4) Parse CLI options and overwrite/add any specified options // -// The above results in btcd functioning properly without any config settings +// The above results in lbcd functioning properly without any config settings // while still allowing the user to override settings with config files and // command line options. Command line options always take precedence. func loadConfig() (*config, []string, error) { @@ -1146,7 +1146,7 @@ func loadConfig() (*config, []string, error) { return &cfg, remainingArgs, nil } -// createDefaultConfig copies the file sample-btcd.conf to the given destination path, +// createDefaultConfig copies the file sample-lbcd.conf to the given destination path, // and populates it with some randomly generated RPC username and password. func createDefaultConfigFile(destinationPath string) error { // Create the destination directory if it does not exists diff --git a/config_test.go b/config_test.go index e54a9f5f..84e7d444 100644 --- a/config_test.go +++ b/config_test.go @@ -20,16 +20,16 @@ func TestCreateDefaultConfigFile(t *testing.T) { if !ok { t.Fatalf("Failed finding config file path") } - sampleConfigFile := filepath.Join(filepath.Dir(path), "sample-btcd.conf") + sampleConfigFile := filepath.Join(filepath.Dir(path), "sample-lbcd.conf") // Setup a temporary directory - tmpDir, err := ioutil.TempDir("", "btcd") + tmpDir, err := ioutil.TempDir("", "lbcd") if err != nil { t.Fatalf("Failed creating a temporary directory: %v", err) } testpath := filepath.Join(tmpDir, "test.conf") - // copy config file to location of btcd binary + // copy config file to location of lbcd binary data, err := ioutil.ReadFile(sampleConfigFile) if err != nil { t.Fatalf("Failed reading sample config file: %v", err) @@ -38,7 +38,7 @@ func TestCreateDefaultConfigFile(t *testing.T) { if err != nil { t.Fatalf("Failed obtaining app path: %v", err) } - tmpConfigFile := filepath.Join(appPath, "sample-btcd.conf") + tmpConfigFile := filepath.Join(appPath, "sample-lbcd.conf") err = ioutil.WriteFile(tmpConfigFile, data, 0644) if err != nil { t.Fatalf("Failed copying sample config file: %v", err) diff --git a/connmgr/seed.go b/connmgr/seed.go index 063b546a..b35d2a1a 100644 --- a/connmgr/seed.go +++ b/connmgr/seed.go @@ -11,8 +11,8 @@ import ( "strconv" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/wire" ) const ( diff --git a/database/cmd/dbtool/fetchblock.go b/database/cmd/dbtool/fetchblock.go index 75a3e31a..b2ac4893 100644 --- a/database/cmd/dbtool/fetchblock.go +++ b/database/cmd/dbtool/fetchblock.go @@ -9,8 +9,8 @@ import ( "errors" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" ) // fetchBlockCmd defines the configuration options for the fetchblock command. diff --git a/database/cmd/dbtool/fetchblockregion.go b/database/cmd/dbtool/fetchblockregion.go index 9d63ed17..0204c36b 100644 --- a/database/cmd/dbtool/fetchblockregion.go +++ b/database/cmd/dbtool/fetchblockregion.go @@ -10,8 +10,8 @@ import ( "strconv" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" ) // blockRegionCmd defines the configuration options for the fetchblockregion diff --git a/database/cmd/dbtool/globalconfig.go b/database/cmd/dbtool/globalconfig.go index aa1e0e04..8d19c2b1 100644 --- a/database/cmd/dbtool/globalconfig.go +++ b/database/cmd/dbtool/globalconfig.go @@ -10,15 +10,15 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) var ( - btcdHomeDir = btcutil.AppDataDir("btcd", false) + btcdHomeDir = btcutil.AppDataDir("lbcd", false) knownDbTypes = database.SupportedDrivers() activeNetParams = &chaincfg.MainNetParams @@ -31,7 +31,7 @@ var ( // config defines the global configuration options. type config struct { - DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"` + DataDir string `short:"b" long:"datadir" description:"Location of the lbcd data directory"` DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"` RegressionTest bool `long:"regtest" description:"Use the regression test network"` SimNet bool `long:"simnet" description:"Use the simulation test network"` @@ -60,7 +60,7 @@ func validDbType(dbType string) bool { } // netName returns the name used when referring to a bitcoin network. At the -// time of writing, btcd currently places blocks for testnet version 3 in the +// time of writing, lbcd currently places blocks for testnet version 3 in the // data and log directory "testnet", which does not match the Name field of the // chaincfg parameters. This function can be used to override this directory name // as "testnet" when the passed active network matches wire.TestNet3. diff --git a/database/cmd/dbtool/insecureimport.go b/database/cmd/dbtool/insecureimport.go index 7564eb68..442873c9 100644 --- a/database/cmd/dbtool/insecureimport.go +++ b/database/cmd/dbtool/insecureimport.go @@ -12,10 +12,10 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // importCmd defines the configuration options for the insecureimport command. diff --git a/database/cmd/dbtool/loadheaders.go b/database/cmd/dbtool/loadheaders.go index a3ee8c73..00bb5411 100644 --- a/database/cmd/dbtool/loadheaders.go +++ b/database/cmd/dbtool/loadheaders.go @@ -7,8 +7,8 @@ package main import ( "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" ) // headersCmd defines the configuration options for the loadheaders command. diff --git a/database/cmd/dbtool/main.go b/database/cmd/dbtool/main.go index 73c59a6e..c7fb6a45 100644 --- a/database/cmd/dbtool/main.go +++ b/database/cmd/dbtool/main.go @@ -9,9 +9,9 @@ import ( "path/filepath" "strings" - "github.com/btcsuite/btcd/database" "github.com/btcsuite/btclog" flags "github.com/jessevdk/go-flags" + "github.com/lbryio/lbcd/database" ) const ( diff --git a/database/driver_test.go b/database/driver_test.go index 3bb48de1..6d0b00a6 100644 --- a/database/driver_test.go +++ b/database/driver_test.go @@ -8,8 +8,8 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" ) var ( diff --git a/database/error_test.go b/database/error_test.go index 759d26e1..4d053d4b 100644 --- a/database/error_test.go +++ b/database/error_test.go @@ -8,7 +8,7 @@ import ( "errors" "testing" - "github.com/btcsuite/btcd/database" + "github.com/lbryio/lbcd/database" ) // TestErrorCodeStringer tests the stringized output for the ErrorCode type. diff --git a/database/example_test.go b/database/example_test.go index 8b6fe7bc..daf475cd 100644 --- a/database/example_test.go +++ b/database/example_test.go @@ -10,11 +10,11 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/database" + _ "github.com/lbryio/lbcd/database/ffldb" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // This example demonstrates creating a new database. @@ -22,8 +22,8 @@ func ExampleCreate() { // This example assumes the ffldb driver is imported. // // import ( - // "github.com/btcsuite/btcd/database" - // _ "github.com/btcsuite/btcd/database/ffldb" + // "github.com/lbryio/lbcd/database" + // _ "github.com/lbryio/lbcd/database/ffldb" // ) // Create a database and schedule it to be closed and removed on exit. @@ -48,8 +48,8 @@ func Example_basicUsage() { // This example assumes the ffldb driver is imported. // // import ( - // "github.com/btcsuite/btcd/database" - // _ "github.com/btcsuite/btcd/database/ffldb" + // "github.com/lbryio/lbcd/database" + // _ "github.com/lbryio/lbcd/database/ffldb" // ) // Create a database and schedule it to be closed and removed on exit. @@ -114,8 +114,8 @@ func Example_blockStorageAndRetrieval() { // This example assumes the ffldb driver is imported. // // import ( - // "github.com/btcsuite/btcd/database" - // _ "github.com/btcsuite/btcd/database/ffldb" + // "github.com/lbryio/lbcd/database" + // _ "github.com/lbryio/lbcd/database/ffldb" // ) // Create a database and schedule it to be closed and removed on exit. @@ -173,5 +173,5 @@ func Example_blockStorageAndRetrieval() { fmt.Printf("Serialized block size: %d bytes\n", len(loadedBlockBytes)) // Output: - // Serialized block size: 285 bytes + // Serialized block size: 229 bytes } diff --git a/database/ffldb/bench_test.go b/database/ffldb/bench_test.go index 8d020313..7ea0d126 100644 --- a/database/ffldb/bench_test.go +++ b/database/ffldb/bench_test.go @@ -9,9 +9,9 @@ import ( "path/filepath" "testing" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/database" + btcutil "github.com/lbryio/lbcutil" ) // BenchmarkBlockHeader benchmarks how long it takes to load the mainnet genesis diff --git a/database/ffldb/blockio.go b/database/ffldb/blockio.go index 8fb27ab2..ae71a891 100644 --- a/database/ffldb/blockio.go +++ b/database/ffldb/blockio.go @@ -17,9 +17,9 @@ import ( "path/filepath" "sync" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" ) const ( diff --git a/database/ffldb/db.go b/database/ffldb/db.go index b4994421..0d6acd51 100644 --- a/database/ffldb/db.go +++ b/database/ffldb/db.go @@ -14,11 +14,6 @@ import ( "sort" "sync" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/database/internal/treap" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" "github.com/btcsuite/goleveldb/leveldb" "github.com/btcsuite/goleveldb/leveldb/comparer" ldberrors "github.com/btcsuite/goleveldb/leveldb/errors" @@ -26,6 +21,11 @@ import ( "github.com/btcsuite/goleveldb/leveldb/iterator" "github.com/btcsuite/goleveldb/leveldb/opt" "github.com/btcsuite/goleveldb/leveldb/util" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/database/internal/treap" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/database/ffldb/dbcache.go b/database/ffldb/dbcache.go index a2346b58..15c554a7 100644 --- a/database/ffldb/dbcache.go +++ b/database/ffldb/dbcache.go @@ -10,10 +10,10 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/database/internal/treap" "github.com/btcsuite/goleveldb/leveldb" "github.com/btcsuite/goleveldb/leveldb/iterator" "github.com/btcsuite/goleveldb/leveldb/util" + "github.com/lbryio/lbcd/database/internal/treap" ) const ( diff --git a/database/ffldb/doc.go b/database/ffldb/doc.go index 96a2992c..cca5ebc5 100644 --- a/database/ffldb/doc.go +++ b/database/ffldb/doc.go @@ -6,7 +6,7 @@ Package ffldb implements a driver for the database package that uses leveldb for the backing metadata and flat files for block storage. -This driver is the recommended driver for use with btcd. It makes use leveldb +This driver is the recommended driver for use with lbcd. It makes use leveldb for the metadata, flat files for block storage, and checksums in key areas to ensure data integrity. diff --git a/database/ffldb/driver.go b/database/ffldb/driver.go index 28ab8277..39a1e02b 100644 --- a/database/ffldb/driver.go +++ b/database/ffldb/driver.go @@ -7,9 +7,9 @@ package ffldb import ( "fmt" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btclog" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" ) var log = btclog.Disabled diff --git a/database/ffldb/driver_test.go b/database/ffldb/driver_test.go index f3db909d..ff53acd0 100644 --- a/database/ffldb/driver_test.go +++ b/database/ffldb/driver_test.go @@ -11,10 +11,10 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/database/ffldb" + btcutil "github.com/lbryio/lbcutil" ) // dbType is the database type name for this driver. diff --git a/database/ffldb/export_test.go b/database/ffldb/export_test.go index 2d8e4d2a..bcad41af 100644 --- a/database/ffldb/export_test.go +++ b/database/ffldb/export_test.go @@ -11,7 +11,7 @@ The functions are only exported while the tests are being run. package ffldb -import "github.com/btcsuite/btcd/database" +import "github.com/lbryio/lbcd/database" // TstRunWithMaxBlockFileSize runs the passed function with the maximum allowed // file size for the database set to the provided value. The value will be set diff --git a/database/ffldb/interface_test.go b/database/ffldb/interface_test.go index 1ce991cc..b1b4cac7 100644 --- a/database/ffldb/interface_test.go +++ b/database/ffldb/interface_test.go @@ -25,11 +25,10 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) var ( diff --git a/database/ffldb/ldbtreapiter.go b/database/ffldb/ldbtreapiter.go index b3d6b6bd..0a552633 100644 --- a/database/ffldb/ldbtreapiter.go +++ b/database/ffldb/ldbtreapiter.go @@ -5,9 +5,9 @@ package ffldb import ( - "github.com/btcsuite/btcd/database/internal/treap" "github.com/btcsuite/goleveldb/leveldb/iterator" "github.com/btcsuite/goleveldb/leveldb/util" + "github.com/lbryio/lbcd/database/internal/treap" ) // ldbTreapIter wraps a treap iterator to provide the additional functionality diff --git a/database/ffldb/reconcile.go b/database/ffldb/reconcile.go index e2c4d6bb..60456c26 100644 --- a/database/ffldb/reconcile.go +++ b/database/ffldb/reconcile.go @@ -8,7 +8,7 @@ import ( "fmt" "hash/crc32" - "github.com/btcsuite/btcd/database" + "github.com/lbryio/lbcd/database" ) // The serialized write cursor location format is: diff --git a/database/ffldb/whitebox_test.go b/database/ffldb/whitebox_test.go index 161d866d..4314c69f 100644 --- a/database/ffldb/whitebox_test.go +++ b/database/ffldb/whitebox_test.go @@ -17,12 +17,11 @@ import ( "path/filepath" "testing" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" "github.com/btcsuite/goleveldb/leveldb" ldberrors "github.com/btcsuite/goleveldb/leveldb/errors" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) var ( diff --git a/database/interface.go b/database/interface.go index 435a8ff5..5b566f11 100644 --- a/database/interface.go +++ b/database/interface.go @@ -8,8 +8,8 @@ package database import ( - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + btcutil "github.com/lbryio/lbcutil" ) // Cursor represents a cursor over key/value pairs and nested buckets of a diff --git a/doc.go b/doc.go index 70d0d9e4..ce62a7cc 100644 --- a/doc.go +++ b/doc.go @@ -3,22 +3,22 @@ // license that can be found in the LICENSE file. /* -btcd is a full-node bitcoin implementation written in Go. +lbcd is a full-node bitcoin implementation written in Go. -The default options are sane for most users. This means btcd will work 'out of +The default options are sane for most users. This means lbcd will work 'out of the box' for most users. However, there are also a wide variety of flags that can be used to control it. The following section provides a usage overview which enumerates the flags. An interesting point to note is that the long form of all of these options (except -C) can be specified in a configuration file that is automatically -parsed when btcd starts up. By default, the configuration file is located at -~/.btcd/btcd.conf on POSIX-style operating systems and %LOCALAPPDATA%\btcd\btcd.conf +parsed when lbcd starts up. By default, the configuration file is located at +~/.lbcd/lbcd.conf on POSIX-style operating systems and %LOCALAPPDATA%\lbcd\lbcd.conf on Windows. The -C (--configfile) flag, as shown below, can be used to override this location. Usage: - btcd [OPTIONS] + lbcd [OPTIONS] Application Options: --addcheckpoint= Add a custom checkpoint. Format: diff --git a/docs/conf.py b/docs/conf.py index 3db16305..145c0ac5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,9 +18,9 @@ from recommonmark.transform import AutoStructify # -- Project information ----------------------------------------------------- -project = 'btcd' -copyright = '2020, btcd' -author = 'btcsuite developers' +project = 'lbcd' +copyright = '2021, lbcd' +author = 'LBRY developers' # The full version, including alpha/beta/rc tags release = 'beta' @@ -65,9 +65,11 @@ html_theme = 'sphinx_rtd_theme' html_static_path = ['_static'] # app setup hook + + def setup(app): app.add_config_value('recommonmark_config', { - #'url_resolver': lambda url: github_doc_root + url, + # 'url_resolver': lambda url: github_doc_root + url, 'auto_toc_tree_section': 'Contents', 'enable_math': False, 'enable_inline_math': False, diff --git a/integration/bip0009_test.go b/integration/bip0009_test.go index 9bdec34f..fa94d2d0 100644 --- a/integration/bip0009_test.go +++ b/integration/bip0009_test.go @@ -13,10 +13,10 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/integration/rpctest" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/integration/rpctest" ) const ( diff --git a/integration/csv_fork_test.go b/integration/csv_fork_test.go index 31466349..1b4ae02b 100644 --- a/integration/csv_fork_test.go +++ b/integration/csv_fork_test.go @@ -14,14 +14,14 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/integration/rpctest" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/integration/rpctest" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/integration/rpcserver_test.go b/integration/rpcserver_test.go index 5875b353..9fbddc6b 100644 --- a/integration/rpcserver_test.go +++ b/integration/rpcserver_test.go @@ -14,10 +14,10 @@ import ( "runtime/debug" "testing" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/integration/rpctest" - "github.com/btcsuite/btcd/rpcclient" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/integration/rpctest" + "github.com/lbryio/lbcd/rpcclient" ) func testGetBestBlock(r *rpctest.Harness, t *testing.T) { diff --git a/integration/rpctest/blockgen.go b/integration/rpctest/blockgen.go index 0d802f5a..dae3b7fd 100644 --- a/integration/rpctest/blockgen.go +++ b/integration/rpctest/blockgen.go @@ -11,13 +11,13 @@ import ( "runtime" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/mining" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // solveBlock attempts to find a nonce which makes the passed block header hash diff --git a/integration/rpctest/btcd.go b/integration/rpctest/btcd.go index 29642c84..e3bd4178 100644 --- a/integration/rpctest/btcd.go +++ b/integration/rpctest/btcd.go @@ -44,16 +44,16 @@ func btcdExecutablePath() (string, error) { } // Build btcd and output an executable in a static temp path. - outputPath := filepath.Join(testDir, "btcd") + outputPath := filepath.Join(testDir, "lbcd") if runtime.GOOS == "windows" { outputPath += ".exe" } cmd := exec.Command( - "go", "build", "-o", outputPath, "github.com/btcsuite/btcd", + "go", "build", "-o", outputPath, "github.com/lbryio/lbcd", ) err = cmd.Run() if err != nil { - return "", fmt.Errorf("Failed to build btcd: %v", err) + return "", fmt.Errorf("Failed to build lbcd: %v", err) } // Save executable path so future calls do not recompile. diff --git a/integration/rpctest/memwallet.go b/integration/rpctest/memwallet.go index 59b0ef4c..c1374ef3 100644 --- a/integration/rpctest/memwallet.go +++ b/integration/rpctest/memwallet.go @@ -10,15 +10,15 @@ import ( "fmt" "sync" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/rpcclient" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/hdkeychain" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/rpcclient" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/hdkeychain" ) var ( diff --git a/integration/rpctest/node.go b/integration/rpctest/node.go index 73dc15fc..2c7644b8 100644 --- a/integration/rpctest/node.go +++ b/integration/rpctest/node.go @@ -14,8 +14,8 @@ import ( "runtime" "time" - rpc "github.com/btcsuite/btcd/rpcclient" - "github.com/btcsuite/btcutil" + rpc "github.com/lbryio/lbcd/rpcclient" + btcutil "github.com/lbryio/lbcutil" ) // nodeConfig contains all the args, and data required to launch a btcd process @@ -51,7 +51,7 @@ func newConfig(prefix, certFile, keyFile string, extra []string, var err error btcdPath, err = btcdExecutablePath() if err != nil { - btcdPath = "btcd" + btcdPath = "lbcd" } } diff --git a/integration/rpctest/rpc_harness.go b/integration/rpctest/rpc_harness.go index 679ae4e4..1d1eaefa 100644 --- a/integration/rpctest/rpc_harness.go +++ b/integration/rpctest/rpc_harness.go @@ -16,11 +16,11 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/rpcclient" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/rpcclient" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( @@ -531,7 +531,7 @@ func generateListeningAddresses() (string, string) { // baseDir is the directory path of the temp directory for all rpctest files. func baseDir() (string, error) { - dirPath := filepath.Join(os.TempDir(), "btcd", "rpctest") + dirPath := filepath.Join(os.TempDir(), "lbcd", "rpctest") err := os.MkdirAll(dirPath, 0755) return dirPath, err } diff --git a/integration/rpctest/rpc_harness_test.go b/integration/rpctest/rpc_harness_test.go index df753e31..de9db318 100644 --- a/integration/rpctest/rpc_harness_test.go +++ b/integration/rpctest/rpc_harness_test.go @@ -13,11 +13,11 @@ import ( "testing" "time" - "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/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) func testSendOutputs(r *Harness, t *testing.T) { diff --git a/integration/rpctest/utils.go b/integration/rpctest/utils.go index d4d76f2e..3273ae3c 100644 --- a/integration/rpctest/utils.go +++ b/integration/rpctest/utils.go @@ -8,8 +8,8 @@ import ( "reflect" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/rpcclient" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/rpcclient" ) // JoinType is an enum representing a particular type of "node join". A node diff --git a/btcd.go b/lbcd.go similarity index 98% rename from btcd.go rename to lbcd.go index 4f04657b..1b2ad72d 100644 --- a/btcd.go +++ b/lbcd.go @@ -15,10 +15,10 @@ import ( "runtime/debug" "runtime/pprof" - "github.com/btcsuite/btcd/blockchain/indexers" - "github.com/btcsuite/btcd/claimtrie/param" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/limits" + "github.com/lbryio/lbcd/blockchain/indexers" + "github.com/lbryio/lbcd/claimtrie/param" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/limits" "github.com/felixge/fgprof" ) diff --git a/log.go b/log.go index a69509cd..cc845475 100644 --- a/log.go +++ b/log.go @@ -10,18 +10,18 @@ import ( "os" "path/filepath" - "github.com/btcsuite/btcd/addrmgr" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/blockchain/indexers" - "github.com/btcsuite/btcd/claimtrie/node" - "github.com/btcsuite/btcd/connmgr" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/mempool" - "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcd/mining/cpuminer" - "github.com/btcsuite/btcd/netsync" - "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/txscript" + "github.com/lbryio/lbcd/addrmgr" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/blockchain/indexers" + "github.com/lbryio/lbcd/claimtrie/node" + "github.com/lbryio/lbcd/connmgr" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/mempool" + "github.com/lbryio/lbcd/mining" + "github.com/lbryio/lbcd/mining/cpuminer" + "github.com/lbryio/lbcd/netsync" + "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/txscript" "github.com/btcsuite/btclog" "github.com/jrick/logrotate/rotator" diff --git a/mempool/error.go b/mempool/error.go index b0d42be4..7d107ae3 100644 --- a/mempool/error.go +++ b/mempool/error.go @@ -5,8 +5,8 @@ package mempool import ( - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/wire" ) // RuleError identifies a rule violation. It is used to indicate that diff --git a/mempool/estimatefee.go b/mempool/estimatefee.go index 55fe4810..719c42e2 100644 --- a/mempool/estimatefee.go +++ b/mempool/estimatefee.go @@ -16,9 +16,9 @@ import ( "strings" "sync" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/mining" + btcutil "github.com/lbryio/lbcutil" ) // TODO incorporate Alex Morcos' modifications to Gavin's initial model diff --git a/mempool/estimatefee_test.go b/mempool/estimatefee_test.go index 16dcfadc..6f86d035 100644 --- a/mempool/estimatefee_test.go +++ b/mempool/estimatefee_test.go @@ -9,10 +9,10 @@ import ( "math/rand" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/mining" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // newTestFeeEstimator creates a feeEstimator with some different parameters diff --git a/mempool/mempool.go b/mempool/mempool.go index 0aecff7e..de3b8028 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -12,15 +12,15 @@ import ( "sync/atomic" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/blockchain/indexers" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/blockchain/indexers" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/mining" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/mempool/mempool_test.go b/mempool/mempool_test.go index 96d50544..b24045ba 100644 --- a/mempool/mempool_test.go +++ b/mempool/mempool_test.go @@ -12,13 +12,13 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcec" - "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/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // fakeChain is used by the pool harness to provide generated test utxos and diff --git a/mempool/policy.go b/mempool/policy.go index c18b0d7d..21899b0f 100644 --- a/mempool/policy.go +++ b/mempool/policy.go @@ -6,12 +6,13 @@ package mempool import ( "fmt" + "math" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/mempool/policy_test.go b/mempool/policy_test.go index b9cdbac4..b677ab82 100644 --- a/mempool/policy_test.go +++ b/mempool/policy_test.go @@ -9,12 +9,12 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/btcec" - "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/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // TestCalcMinRequiredTxRelayFee tests the calcMinRequiredTxRelayFee API. diff --git a/mining/cpuminer/cpuminer.go b/mining/cpuminer/cpuminer.go index 3d5b3b19..b9d1d222 100644 --- a/mining/cpuminer/cpuminer.go +++ b/mining/cpuminer/cpuminer.go @@ -12,12 +12,12 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/mining" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/mining/mining.go b/mining/mining.go index e918328d..4daad1a6 100644 --- a/mining/mining.go +++ b/mining/mining.go @@ -10,12 +10,12 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/blockchain" - "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/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( @@ -30,7 +30,7 @@ const ( // CoinbaseFlags is added to the coinbase script of a generated block // and is used to monitor BIP16 support as well as blocks that are // generated via btcd. - CoinbaseFlags = "/P2SH/btcd/" + CoinbaseFlags = "/P2SH/lbcd/" ) // TxDesc is a descriptor about a transaction in a transaction source along with diff --git a/mining/mining_test.go b/mining/mining_test.go index 362253e5..f2a65419 100644 --- a/mining/mining_test.go +++ b/mining/mining_test.go @@ -9,7 +9,7 @@ import ( "math/rand" "testing" - "github.com/btcsuite/btcutil" + btcutil "github.com/lbryio/lbcutil" ) // TestTxFeePrioHeap ensures the priority queue for transaction fees and diff --git a/mining/policy.go b/mining/policy.go index c3f059c5..040095f9 100644 --- a/mining/policy.go +++ b/mining/policy.go @@ -5,9 +5,9 @@ package mining import ( - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/mining/policy_test.go b/mining/policy_test.go index f66a9c8d..e7ababfa 100644 --- a/mining/policy_test.go +++ b/mining/policy_test.go @@ -8,10 +8,10 @@ import ( "encoding/hex" "testing" - "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" + btcutil "github.com/lbryio/lbcutil" ) // newHashFromStr converts the passed big-endian hex string into a diff --git a/netsync/blocklogger.go b/netsync/blocklogger.go index 18480e78..34a549a1 100644 --- a/netsync/blocklogger.go +++ b/netsync/blocklogger.go @@ -9,7 +9,7 @@ import ( "time" "github.com/btcsuite/btclog" - "github.com/btcsuite/btcutil" + btcutil "github.com/lbryio/lbcutil" ) // blockProgressLogger provides periodic logging for other services in order diff --git a/netsync/interface.go b/netsync/interface.go index 3e6ca1c1..9361bfbc 100644 --- a/netsync/interface.go +++ b/netsync/interface.go @@ -5,13 +5,13 @@ package netsync import ( - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/mempool" - "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/mempool" + "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // PeerNotifier exposes methods to notify peers of status changes to diff --git a/netsync/manager.go b/netsync/manager.go index 2b6c0411..2e3f05b0 100644 --- a/netsync/manager.go +++ b/netsync/manager.go @@ -12,14 +12,14 @@ import ( "sync/atomic" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/mempool" - peerpkg "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/mempool" + peerpkg "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/params.go b/params.go index b4d1453d..664a7e6a 100644 --- a/params.go +++ b/params.go @@ -5,8 +5,8 @@ package main import ( - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/wire" ) // activeNetParams is a pointer to the parameters specific to the diff --git a/peer/doc.go b/peer/doc.go index 88fae8e8..1bb8cf32 100644 --- a/peer/doc.go +++ b/peer/doc.go @@ -145,6 +145,6 @@ raw message bytes using a format similar to hexdump -C. Bitcoin Improvement Proposals This package supports all BIPS supported by the wire package. -(https://pkg.go.dev/github.com/btcsuite/btcd/wire#hdr-Bitcoin_Improvement_Proposals) +(https://pkg.go.dev/github.com/lbryio/lbcd/wire#hdr-Bitcoin_Improvement_Proposals) */ package peer diff --git a/peer/example_test.go b/peer/example_test.go index d4662a2b..268ed1ea 100644 --- a/peer/example_test.go +++ b/peer/example_test.go @@ -10,9 +10,9 @@ import ( "net" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/wire" ) // mockRemotePeer creates a basic inbound peer listening on the simnet port for diff --git a/peer/log.go b/peer/log.go index 71bebd0d..a96b8e50 100644 --- a/peer/log.go +++ b/peer/log.go @@ -9,10 +9,10 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btclog" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" ) const ( diff --git a/peer/peer.go b/peer/peer.go index a7b92580..ab8add08 100644 --- a/peer/peer.go +++ b/peer/peer.go @@ -18,13 +18,13 @@ import ( "sync/atomic" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/go-socks/socks" "github.com/davecgh/go-spew/spew" "github.com/decred/dcrd/lru" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) const ( diff --git a/peer/peer_test.go b/peer/peer_test.go index dd7f36aa..0cb9c66c 100644 --- a/peer/peer_test.go +++ b/peer/peer_test.go @@ -13,11 +13,11 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/go-socks/socks" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/wire" ) // conn mocks a network connection by implementing the net.Conn interface. It diff --git a/rpcadapters.go b/rpcadapters.go index ddcdf79b..2a1af72f 100644 --- a/rpcadapters.go +++ b/rpcadapters.go @@ -7,13 +7,13 @@ package main import ( "sync/atomic" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/mempool" - "github.com/btcsuite/btcd/netsync" - "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/mempool" + "github.com/lbryio/lbcd/netsync" + "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // rpcPeer provides a peer for use with the RPC server and implements the diff --git a/rpcclient/chain.go b/rpcclient/chain.go index a97543fd..b3735cee 100644 --- a/rpcclient/chain.go +++ b/rpcclient/chain.go @@ -10,9 +10,9 @@ import ( "encoding/hex" "encoding/json" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // FutureGetBestBlockHashResult is a future promise to deliver the result of a diff --git a/rpcclient/doc.go b/rpcclient/doc.go index b682ba10..d82a40a1 100644 --- a/rpcclient/doc.go +++ b/rpcclient/doc.go @@ -9,7 +9,7 @@ Overview This client provides a robust and easy to use client for interfacing with a Bitcoin RPC server that uses a btcd/bitcoin core compatible Bitcoin JSON-RPC -API. This client has been tested with btcd (https://github.com/btcsuite/btcd), +API. This client has been tested with btcd (https://github.com/lbryio/lbcd), btcwallet (https://github.com/btcsuite/btcwallet), and bitcoin core (https://github.com/bitcoin). diff --git a/rpcclient/example_test.go b/rpcclient/example_test.go index 9ba9adad..f044e9f1 100644 --- a/rpcclient/example_test.go +++ b/rpcclient/example_test.go @@ -6,7 +6,8 @@ package rpcclient import ( "fmt" - "github.com/btcsuite/btcd/btcjson" + + "github.com/lbryio/lbcd/btcjson" ) var connCfg = &ConnConfig{ diff --git a/rpcclient/examples/bitcoincorehttp/main.go b/rpcclient/examples/bitcoincorehttp/main.go index 489770a2..54e727de 100644 --- a/rpcclient/examples/bitcoincorehttp/main.go +++ b/rpcclient/examples/bitcoincorehttp/main.go @@ -7,7 +7,7 @@ package main import ( "log" - "github.com/btcsuite/btcd/rpcclient" + "github.com/lbryio/lbcd/rpcclient" ) func main() { diff --git a/rpcclient/examples/bitcoincorehttpbulk/main.go b/rpcclient/examples/bitcoincorehttpbulk/main.go index 3dce058d..fd21ede4 100644 --- a/rpcclient/examples/bitcoincorehttpbulk/main.go +++ b/rpcclient/examples/bitcoincorehttpbulk/main.go @@ -8,7 +8,7 @@ import ( "fmt" "log" - "github.com/btcsuite/btcd/rpcclient" + "github.com/lbryio/lbcd/rpcclient" ) func main() { diff --git a/rpcclient/examples/btcdwebsockets/main.go b/rpcclient/examples/btcdwebsockets/main.go index 56d12d82..30bb4188 100644 --- a/rpcclient/examples/btcdwebsockets/main.go +++ b/rpcclient/examples/btcdwebsockets/main.go @@ -10,9 +10,9 @@ import ( "path/filepath" "time" - "github.com/btcsuite/btcd/rpcclient" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/rpcclient" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) func main() { @@ -32,7 +32,7 @@ func main() { } // Connect to local btcd RPC server using websockets. - btcdHomeDir := btcutil.AppDataDir("btcd", false) + btcdHomeDir := btcutil.AppDataDir("lbcd", false) certs, err := ioutil.ReadFile(filepath.Join(btcdHomeDir, "rpc.cert")) if err != nil { log.Fatal(err) diff --git a/rpcclient/examples/btcwalletwebsockets/main.go b/rpcclient/examples/btcwalletwebsockets/main.go index e803138d..b0bc6f83 100644 --- a/rpcclient/examples/btcwalletwebsockets/main.go +++ b/rpcclient/examples/btcwalletwebsockets/main.go @@ -10,9 +10,9 @@ import ( "path/filepath" "time" - "github.com/btcsuite/btcd/rpcclient" - "github.com/btcsuite/btcutil" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/rpcclient" + btcutil "github.com/lbryio/lbcutil" ) func main() { @@ -27,8 +27,8 @@ func main() { }, } - // Connect to local btcwallet RPC server using websockets. - certHomeDir := btcutil.AppDataDir("btcwallet", false) + // Connect to local lbcwallet RPC server using websockets. + certHomeDir := btcutil.AppDataDir("lbcwallet", false) certs, err := ioutil.ReadFile(filepath.Join(certHomeDir, "rpc.cert")) if err != nil { log.Fatal(err) diff --git a/rpcclient/extensions.go b/rpcclient/extensions.go index c8615293..da44e91f 100644 --- a/rpcclient/extensions.go +++ b/rpcclient/extensions.go @@ -12,10 +12,10 @@ import ( "encoding/json" "fmt" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // FutureDebugLevelResult is a future promise to deliver the result of a diff --git a/rpcclient/infrastructure.go b/rpcclient/infrastructure.go index 63874c1b..730f8bcb 100644 --- a/rpcclient/infrastructure.go +++ b/rpcclient/infrastructure.go @@ -25,10 +25,10 @@ import ( "sync/atomic" "time" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/go-socks/socks" "github.com/btcsuite/websocket" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg" ) var ( @@ -114,8 +114,8 @@ const ( // 0.19.0. BitcoindPost19 - // Btcd represents a catch-all btcd version. - Btcd + // Lbcd represents a catch-all lbcd version. + Lbcd ) // Client represents a Bitcoin RPC client which allows easy access to the @@ -1587,8 +1587,8 @@ func (c *Client) BackendVersion() (BackendVersion, error) { switch err := err.(type) { // Parse the btcd version and cache it. case nil: - log.Debugf("Detected btcd version: %v", info.Version) - version := Btcd + log.Debugf("Detected lbcd version: %v", info.Version) + version := Lbcd c.backendVersion = &version return *c.backendVersion, nil @@ -1596,12 +1596,12 @@ func (c *Client) BackendVersion() (BackendVersion, error) { // we actually ran into an error. case *btcjson.RPCError: if err.Code != btcjson.ErrRPCMethodNotFound.Code { - return 0, fmt.Errorf("unable to detect btcd version: "+ + return 0, fmt.Errorf("unable to detect lbcd version: "+ "%v", err) } default: - return 0, fmt.Errorf("unable to detect btcd version: %v", err) + return 0, fmt.Errorf("unable to detect lbcd version: %v", err) } // Since the GetInfo method was not found, we assume the client is diff --git a/rpcclient/mining.go b/rpcclient/mining.go index 15473e24..ead35213 100644 --- a/rpcclient/mining.go +++ b/rpcclient/mining.go @@ -9,9 +9,9 @@ import ( "encoding/json" "errors" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg/chainhash" + btcutil "github.com/lbryio/lbcutil" ) // FutureGenerateResult is a future promise to deliver the result of a diff --git a/rpcclient/net.go b/rpcclient/net.go index da2006c2..2d268235 100644 --- a/rpcclient/net.go +++ b/rpcclient/net.go @@ -7,7 +7,7 @@ package rpcclient import ( "encoding/json" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // AddNodeCommand enumerates the available commands that the AddNode function diff --git a/rpcclient/notify.go b/rpcclient/notify.go index 6879099a..dff3b416 100644 --- a/rpcclient/notify.go +++ b/rpcclient/notify.go @@ -13,10 +13,10 @@ import ( "fmt" "time" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) var ( @@ -419,7 +419,7 @@ func (c *Client) handleNotification(ntfn *rawNotification) { connected, err := parseBtcdConnectedNtfnParams(ntfn.Params) if err != nil { - log.Warnf("Received invalid btcd connected "+ + log.Warnf("Received invalid lbcd connected "+ "notification: %v", err) return } diff --git a/rpcclient/rawrequest.go b/rpcclient/rawrequest.go index f446b008..7c3bddf9 100644 --- a/rpcclient/rawrequest.go +++ b/rpcclient/rawrequest.go @@ -8,7 +8,7 @@ import ( "encoding/json" "errors" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // FutureRawResult is a future promise to deliver the result of a RawRequest RPC diff --git a/rpcclient/rawtransactions.go b/rpcclient/rawtransactions.go index cfc322c7..d0f28c8a 100644 --- a/rpcclient/rawtransactions.go +++ b/rpcclient/rawtransactions.go @@ -9,10 +9,10 @@ import ( "encoding/hex" "encoding/json" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/rpcclient/wallet.go b/rpcclient/wallet.go index 71435d99..df928969 100644 --- a/rpcclient/wallet.go +++ b/rpcclient/wallet.go @@ -8,11 +8,11 @@ import ( "encoding/json" "strconv" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // ***************************** diff --git a/rpcserverhelp.go b/rpcserverhelp.go index 570b5b05..e8f7a640 100644 --- a/rpcserverhelp.go +++ b/rpcserverhelp.go @@ -11,7 +11,7 @@ import ( "strings" "sync" - "github.com/btcsuite/btcd/btcjson" + "github.com/lbryio/lbcd/btcjson" ) // helpDescsEnUS defines the English descriptions used for the help strings. @@ -21,7 +21,7 @@ var helpDescsEnUS = map[string]string{ "The levelspec can either a debug level or of the form:\n" + "=,=,...\n" + "The valid debug levels are trace, debug, info, warn, error, and critical.\n" + - "The valid subsystems are AMGR, ADXR, BCDB, BMGR, BTCD, CHAN, DISC, PEER, RPCS, SCRP, SRVR, and TXMP.\n" + + "The valid subsystems are AMGR, ADXR, BCDB, BMGR, MAIN, LBRY, CHAN, DISC, PEER, RPCS, SCRP, SRVR, and TXMP.\n" + "Finally the keyword 'show' will return a list of the available subsystems.", "debuglevel-levelspec": "The debug level(s) to use or the keyword 'show'", "debuglevel--condition0": "levelspec!=show", @@ -52,7 +52,7 @@ var helpDescsEnUS = map[string]string{ "createrawtransaction-amounts": "JSON object with the destination addresses as keys and amounts as values", "createrawtransaction-amounts--key": "address", "createrawtransaction-amounts--value": "n.nnn", - "createrawtransaction-amounts--desc": "The destination address as the key and the amount in BTC as the value", + "createrawtransaction-amounts--desc": "The destination address as the key and the amount in LBC as the value", "createrawtransaction-locktime": "Locktime value; a non-zero value will also locktime-activate the inputs", "createrawtransaction--result0": "Hex-encoded bytes of the serialized transaction", @@ -87,9 +87,11 @@ var helpDescsEnUS = map[string]string{ "scriptpubkeyresult-reqSigs": "The number of required signatures", "scriptpubkeyresult-type": "The type of the script (e.g. 'pubkeyhash')", "scriptpubkeyresult-addresses": "The bitcoin addresses associated with this script", + "scriptpubkeyresult-issupport": "Creates a support", + "scriptpubkeyresult-isclaim": "Creates or updates a claim", // Vout help. - "vout-value": "The amount in BTC", + "vout-value": "The amount in LBC", "vout-n": "The index of this transaction output", "vout-scriptPubKey": "The public key script used to pay coins as a JSON object", @@ -388,7 +390,7 @@ var helpDescsEnUS = map[string]string{ "infochainresult-proxy": "The proxy used by the server", "infochainresult-difficulty": "The current target difficulty", "infochainresult-testnet": "Whether or not server is using testnet", - "infochainresult-relayfee": "The minimum relay fee for non-free transactions in BTC/KB", + "infochainresult-relayfee": "The minimum relay fee for non-free transactions in LBC/KB", "infochainresult-errors": "Any current errors", // InfoWalletResult help. @@ -405,8 +407,8 @@ var helpDescsEnUS = map[string]string{ "infowalletresult-keypoololdest": "Seconds since 1 Jan 1970 GMT of the oldest pre-generated key in the key pool", "infowalletresult-keypoolsize": "The number of new keys that are pre-generated", "infowalletresult-unlocked_until": "The timestamp in seconds since 1 Jan 1970 GMT that the wallet is unlocked for transfers, or 0 if the wallet is locked", - "infowalletresult-paytxfee": "The transaction fee set in BTC/KB", - "infowalletresult-relayfee": "The minimum relay fee for non-free transactions in BTC/KB", + "infowalletresult-paytxfee": "The transaction fee set in LBC/KB", + "infowalletresult-relayfee": "The minimum relay fee for non-free transactions in LBC/KB", "infowalletresult-errors": "Any current errors", // GetHeadersCmd help. @@ -522,7 +524,7 @@ var helpDescsEnUS = map[string]string{ // GetTxOutResult help. "gettxoutresult-bestblock": "The block hash that contains the transaction output", "gettxoutresult-confirmations": "The number of confirmations", - "gettxoutresult-value": "The transaction amount in BTC", + "gettxoutresult-value": "The transaction amount in LBC", "gettxoutresult-scriptPubKey": "The public key script used to pay coins as a JSON object", "gettxoutresult-version": "The transaction version", "gettxoutresult-coinbase": "Whether or not the transaction is a coinbase", @@ -565,7 +567,7 @@ var helpDescsEnUS = map[string]string{ // SendRawTransactionCmd help. "sendrawtransaction--synopsis": "Submits the serialized, hex-encoded transaction to the local peer and relays it to the network.", "sendrawtransaction-hextx": "Serialized, hex-encoded signed transaction", - "sendrawtransaction-feesetting": "Whether or not to allow insanely high fees in bitcoind < v0.19.0 or the max fee rate for bitcoind v0.19.0 and later (btcd does not yet implement this parameter, so it has no effect)", + "sendrawtransaction-feesetting": "Whether or not to allow insanely high fees in bitcoind < v0.19.0 or the max fee rate for bitcoind v0.19.0 and later (lbcd does not yet implement this parameter, so it has no effect)", "sendrawtransaction--result0": "The hash of the transaction", "allowhighfeesormaxfeerate-value": "Either the boolean value for the allowhighfees parameter in bitcoind < v0.19.0 or the numerical value for the maxfeerate field in bitcoind v0.19.0 and later", @@ -581,8 +583,8 @@ var helpDescsEnUS = map[string]string{ "signmessagewithprivkey--result0": "The signature of the message encoded in base 64", // StopCmd help. - "stop--synopsis": "Shutdown btcd.", - "stop--result0": "The string 'btcd stopping.'", + "stop--synopsis": "Shutdown lbcd.", + "stop--result0": "The string 'lbcd stopping.'", // SubmitBlockOptions help. "submitblockoptions-workid": "This parameter is currently ignored", @@ -610,7 +612,7 @@ var helpDescsEnUS = map[string]string{ // VerifyChainCmd help. "verifychain--synopsis": "Verifies the block chain database.\n" + "The actual checks performed by the checklevel parameter are implementation specific.\n" + - "For btcd this is:\n" + + "For lbcd this is:\n" + "checklevel=0 - Look up each block and ensure it can be loaded from the database.\n" + "checklevel=1 - Perform basic context-free sanity checks on each block.", "verifychain-checklevel": "How thorough the block verification is", @@ -657,7 +659,7 @@ var helpDescsEnUS = map[string]string{ "outpoint-index": "The index of the outpoint", // NotifySpentCmd help. - "notifyspent--synopsis": "Send a redeemingtx notification when a transaction spending an outpoint appears in mempool (if relayed to this btcd instance) and when such a transaction first appears in a newly-attached block.", + "notifyspent--synopsis": "Send a redeemingtx notification when a transaction spending an outpoint appears in mempool (if relayed to this lbcd instance) and when such a transaction first appears in a newly-attached block.", "notifyspent-outpoints": "List of transaction outpoints to monitor.", // StopNotifySpentCmd help. diff --git a/rpcwebsocket.go b/rpcwebsocket.go index 356a8974..dd18686a 100644 --- a/rpcwebsocket.go +++ b/rpcwebsocket.go @@ -20,15 +20,15 @@ import ( "sync" "time" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" "github.com/btcsuite/websocket" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/btcjson" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" "golang.org/x/crypto/ripemd160" ) diff --git a/server.go b/server.go index f550ec8d..690f6ceb 100644 --- a/server.go +++ b/server.go @@ -22,24 +22,24 @@ import ( "sync/atomic" "time" - "github.com/btcsuite/btcd/addrmgr" - "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/blockchain/indexers" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/claimtrie" - claimtrieconfig "github.com/btcsuite/btcd/claimtrie/config" - "github.com/btcsuite/btcd/connmgr" - "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/mempool" - "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcd/mining/cpuminer" - "github.com/btcsuite/btcd/netsync" - "github.com/btcsuite/btcd/peer" - "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" - "github.com/btcsuite/btcutil/bloom" + "github.com/lbryio/lbcd/addrmgr" + "github.com/lbryio/lbcd/blockchain" + "github.com/lbryio/lbcd/blockchain/indexers" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/claimtrie" + claimtrieconfig "github.com/lbryio/lbcd/claimtrie/config" + "github.com/lbryio/lbcd/connmgr" + "github.com/lbryio/lbcd/database" + "github.com/lbryio/lbcd/mempool" + "github.com/lbryio/lbcd/mining" + "github.com/lbryio/lbcd/mining/cpuminer" + "github.com/lbryio/lbcd/netsync" + "github.com/lbryio/lbcd/peer" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" + "github.com/lbryio/lbcutil/bloom" ) const ( @@ -2539,7 +2539,7 @@ out: // listen port? // XXX this assumes timeout is in seconds. listenPort, err := s.nat.AddPortMapping("tcp", int(lport), int(lport), - "btcd listen port", 20*60) + "lbcd listen port", 20*60) if err != nil { srvrLog.Warnf("can't add UPnP port mapping: %v", err) } diff --git a/txscript/bench_test.go b/txscript/bench_test.go index cac29202..e568b7fc 100644 --- a/txscript/bench_test.go +++ b/txscript/bench_test.go @@ -10,8 +10,8 @@ import ( "io/ioutil" "testing" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/wire" ) var ( diff --git a/txscript/engine.go b/txscript/engine.go index 40ba0eef..66ead036 100644 --- a/txscript/engine.go +++ b/txscript/engine.go @@ -12,8 +12,8 @@ import ( "math/big" "strings" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/wire" ) // ScriptFlags is a bitmask defining additional operations or tests that will be diff --git a/txscript/engine_test.go b/txscript/engine_test.go index 5818080d..09f945c9 100644 --- a/txscript/engine_test.go +++ b/txscript/engine_test.go @@ -8,8 +8,8 @@ package txscript import ( "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // TestBadPC sets the pc to a deliberately bad result then confirms that Step diff --git a/txscript/example_test.go b/txscript/example_test.go index 6e17341c..82a11799 100644 --- a/txscript/example_test.go +++ b/txscript/example_test.go @@ -9,12 +9,12 @@ import ( "encoding/hex" "fmt" - "github.com/btcsuite/btcd/btcec" - "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/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/txscript" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // This example demonstrates creating a script which pays to a bitcoin address. diff --git a/txscript/hashcache.go b/txscript/hashcache.go index f9c2caf7..ab5d9d1b 100644 --- a/txscript/hashcache.go +++ b/txscript/hashcache.go @@ -7,8 +7,8 @@ package txscript import ( "sync" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // TxSigHashes houses the partial set of sighashes introduced within BIP0143. diff --git a/txscript/hashcache_test.go b/txscript/hashcache_test.go index cee59b99..c1373497 100644 --- a/txscript/hashcache_test.go +++ b/txscript/hashcache_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/wire" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/wire" ) func init() { diff --git a/txscript/opcode.go b/txscript/opcode.go index 4c00f353..7df52d7a 100644 --- a/txscript/opcode.go +++ b/txscript/opcode.go @@ -15,9 +15,9 @@ import ( "golang.org/x/crypto/ripemd160" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // An opcode defines the information related to a txscript opcode. opfunc, if diff --git a/txscript/pkscript.go b/txscript/pkscript.go index f5b11e6d..999ce212 100644 --- a/txscript/pkscript.go +++ b/txscript/pkscript.go @@ -5,10 +5,10 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" "golang.org/x/crypto/ripemd160" ) diff --git a/txscript/pkscript_test.go b/txscript/pkscript_test.go index 49e2db8a..1e95a49f 100644 --- a/txscript/pkscript_test.go +++ b/txscript/pkscript_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // TestParsePkScript ensures that the supported script types can be parsed diff --git a/txscript/reference_test.go b/txscript/reference_test.go index 9d9c8f39..9642e424 100644 --- a/txscript/reference_test.go +++ b/txscript/reference_test.go @@ -15,9 +15,9 @@ import ( "strings" "testing" - "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" + btcutil "github.com/lbryio/lbcutil" ) // scriptTestName returns a descriptive test name for the given reference script diff --git a/txscript/script.go b/txscript/script.go index 1b3a60bd..6354a92b 100644 --- a/txscript/script.go +++ b/txscript/script.go @@ -12,8 +12,8 @@ import ( "strings" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" ) // Bip16Activation is the timestamp where BIP0016 is valid to use in the diff --git a/txscript/script_test.go b/txscript/script_test.go index 86f94d84..dd61c4a6 100644 --- a/txscript/script_test.go +++ b/txscript/script_test.go @@ -9,7 +9,7 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/wire" + "github.com/lbryio/lbcd/wire" ) // TestPushedData ensured the PushedData function extracts the expected data out diff --git a/txscript/sigcache.go b/txscript/sigcache.go index d9e4fa6c..56db61b5 100644 --- a/txscript/sigcache.go +++ b/txscript/sigcache.go @@ -7,8 +7,8 @@ package txscript import ( "sync" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // sigCacheEntry represents an entry in the SigCache. Entries within the diff --git a/txscript/sigcache_test.go b/txscript/sigcache_test.go index 5413ea3b..40958cfb 100644 --- a/txscript/sigcache_test.go +++ b/txscript/sigcache_test.go @@ -8,8 +8,8 @@ import ( "crypto/rand" "testing" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // genRandomSig returns a random message, a signature of the message under the diff --git a/txscript/sign.go b/txscript/sign.go index 138e31cd..7562ca34 100644 --- a/txscript/sign.go +++ b/txscript/sign.go @@ -8,10 +8,10 @@ import ( "errors" "fmt" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) // RawTxInWitnessSignature returns the serialized ECDA signature for the input diff --git a/txscript/sign_test.go b/txscript/sign_test.go index b97a8a64..abed8c36 100644 --- a/txscript/sign_test.go +++ b/txscript/sign_test.go @@ -9,11 +9,11 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/btcec" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/btcec" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) type addressToKey struct { diff --git a/txscript/standard.go b/txscript/standard.go index 2437b3cc..a45bfc6f 100644 --- a/txscript/standard.go +++ b/txscript/standard.go @@ -7,9 +7,9 @@ package txscript import ( "fmt" - "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcutil" + "github.com/lbryio/lbcd/chaincfg" + "github.com/lbryio/lbcd/wire" + btcutil "github.com/lbryio/lbcutil" ) const ( diff --git a/txscript/standard_test.go b/txscript/standard_test.go index 582d30ee..d58154e7 100644 --- a/txscript/standard_test.go +++ b/txscript/standard_test.go @@ -11,9 +11,9 @@ import ( "reflect" "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" + btcutil "github.com/lbryio/lbcutil" ) // mustParseShortForm parses the passed short form script and returns the diff --git a/upgrade.go b/upgrade.go index 5dec8d4c..9b5461da 100644 --- a/upgrade.go +++ b/upgrade.go @@ -35,13 +35,13 @@ func oldBtcdHomeDir() string { // Search for Windows APPDATA first. This won't exist on POSIX OSes. appData := os.Getenv("APPDATA") if appData != "" { - return filepath.Join(appData, "btcd") + return filepath.Join(appData, "lbcd") } // Fall back to standard HOME directory that works for most POSIX OSes. home := os.Getenv("HOME") if home != "" { - return filepath.Join(home, ".btcd") + return filepath.Join(home, ".lbcd") } // In the worst case, use the current directory. @@ -96,9 +96,9 @@ func upgradeDBPaths() error { // respective networks. Check for the old database and update it to the // new path introduced with version 0.2.0 accordingly. oldDbRoot := filepath.Join(oldBtcdHomeDir(), "db") - upgradeDBPathNet(filepath.Join(oldDbRoot, "btcd.db"), "mainnet") - upgradeDBPathNet(filepath.Join(oldDbRoot, "btcd_testnet.db"), "testnet") - upgradeDBPathNet(filepath.Join(oldDbRoot, "btcd_regtest.db"), "regtest") + upgradeDBPathNet(filepath.Join(oldDbRoot, "lbcd.db"), "mainnet") + upgradeDBPathNet(filepath.Join(oldDbRoot, "lbcd_testnet.db"), "testnet") + upgradeDBPathNet(filepath.Join(oldDbRoot, "lbcd_regtest.db"), "regtest") // Remove the old db directory. return os.RemoveAll(oldDbRoot) diff --git a/wire/bench_test.go b/wire/bench_test.go index f6637d42..1eb6c413 100644 --- a/wire/bench_test.go +++ b/wire/bench_test.go @@ -13,7 +13,7 @@ import ( "os" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // genesisCoinbaseTx is the coinbase transaction for the genesis blocks for diff --git a/wire/blockheader.go b/wire/blockheader.go index ee45ec3b..372b7b46 100644 --- a/wire/blockheader.go +++ b/wire/blockheader.go @@ -9,12 +9,12 @@ import ( "io" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // MaxBlockHeaderPayload is the maximum number of bytes a block header can be. // Version 4 bytes + Timestamp 4 bytes + Bits 4 bytes + Nonce 4 bytes + -// PrevBlock and MerkleRoot hashes. +// PrevBlock, ClaimTrie, and MerkleRoot hashes. const MaxBlockHeaderPayload = 16 + (chainhash.HashSize * 3) // BlockHeader defines information about a block and is used in the bitcoin diff --git a/wire/common.go b/wire/common.go index 8d61bdb6..134e0547 100644 --- a/wire/common.go +++ b/wire/common.go @@ -12,7 +12,7 @@ import ( "math" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) const ( diff --git a/wire/common_test.go b/wire/common_test.go index 46e3fa66..d71cc9c9 100644 --- a/wire/common_test.go +++ b/wire/common_test.go @@ -12,8 +12,8 @@ import ( "strings" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // mainNetGenesisHash is the hash of the first block in the block chain for the diff --git a/wire/invvect.go b/wire/invvect.go index 1e706642..d84b52bf 100644 --- a/wire/invvect.go +++ b/wire/invvect.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) const ( diff --git a/wire/invvect_test.go b/wire/invvect_test.go index 1d02c098..1be745c3 100644 --- a/wire/invvect_test.go +++ b/wire/invvect_test.go @@ -9,8 +9,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestInvVectStringer tests the stringized output for inventory vector types. diff --git a/wire/message.go b/wire/message.go index 6d3147a8..23cc2e05 100644 --- a/wire/message.go +++ b/wire/message.go @@ -10,7 +10,7 @@ import ( "io" "unicode/utf8" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // MessageHeaderSize is the number of bytes in a bitcoin message header. diff --git a/wire/message_test.go b/wire/message_test.go index 3a422e66..b2ae3f63 100644 --- a/wire/message_test.go +++ b/wire/message_test.go @@ -13,8 +13,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // makeHeader is a convenience function to make a message header in the form of diff --git a/wire/msgblock.go b/wire/msgblock.go index 4172949d..c940b971 100644 --- a/wire/msgblock.go +++ b/wire/msgblock.go @@ -9,7 +9,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // defaultTransactionAlloc is the default size used for the backing array diff --git a/wire/msgblock_test.go b/wire/msgblock_test.go index 2a861b20..407e3b2d 100644 --- a/wire/msgblock_test.go +++ b/wire/msgblock_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestBlock tests the MsgBlock API. diff --git a/wire/msgcfcheckpt.go b/wire/msgcfcheckpt.go index fc3fd532..91e20de5 100644 --- a/wire/msgcfcheckpt.go +++ b/wire/msgcfcheckpt.go @@ -9,7 +9,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) const ( diff --git a/wire/msgcfheaders.go b/wire/msgcfheaders.go index 40d30f9b..0581581f 100644 --- a/wire/msgcfheaders.go +++ b/wire/msgcfheaders.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) const ( diff --git a/wire/msgcfilter.go b/wire/msgcfilter.go index 097590b2..838b0f55 100644 --- a/wire/msgcfilter.go +++ b/wire/msgcfilter.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // FilterType is used to represent a filter type. diff --git a/wire/msggetblocks.go b/wire/msggetblocks.go index caf4400c..1f94245d 100644 --- a/wire/msggetblocks.go +++ b/wire/msggetblocks.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // MaxBlockLocatorsPerMsg is the maximum number of block locator hashes allowed diff --git a/wire/msggetblocks_test.go b/wire/msggetblocks_test.go index 376f7338..0893cc17 100644 --- a/wire/msggetblocks_test.go +++ b/wire/msggetblocks_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestGetBlocks tests the MsgGetBlocks API. diff --git a/wire/msggetcfcheckpt.go b/wire/msggetcfcheckpt.go index c30a86ce..4f7fde47 100644 --- a/wire/msggetcfcheckpt.go +++ b/wire/msggetcfcheckpt.go @@ -7,7 +7,7 @@ package wire import ( "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // MsgGetCFCheckpt is a request for filter headers at evenly spaced intervals diff --git a/wire/msggetcfheaders.go b/wire/msggetcfheaders.go index 03a1caf7..46f6aa5f 100644 --- a/wire/msggetcfheaders.go +++ b/wire/msggetcfheaders.go @@ -7,7 +7,7 @@ package wire import ( "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // MsgGetCFHeaders is a message similar to MsgGetHeaders, but for committed diff --git a/wire/msggetcfilters.go b/wire/msggetcfilters.go index 80024138..759950fd 100644 --- a/wire/msggetcfilters.go +++ b/wire/msggetcfilters.go @@ -7,7 +7,7 @@ package wire import ( "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // MaxGetCFiltersReqRange the maximum number of filters that may be requested in diff --git a/wire/msggetdata_test.go b/wire/msggetdata_test.go index a2dd4651..9e34f296 100644 --- a/wire/msggetdata_test.go +++ b/wire/msggetdata_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestGetData tests the MsgGetData API. diff --git a/wire/msggetheaders.go b/wire/msggetheaders.go index 0bbe42cb..aa5cc3f2 100644 --- a/wire/msggetheaders.go +++ b/wire/msggetheaders.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // MsgGetHeaders implements the Message interface and represents a bitcoin diff --git a/wire/msggetheaders_test.go b/wire/msggetheaders_test.go index 34a24ae3..a9ee7ad9 100644 --- a/wire/msggetheaders_test.go +++ b/wire/msggetheaders_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestGetHeaders tests the MsgGetHeader API. diff --git a/wire/msginv_test.go b/wire/msginv_test.go index b7c7c6ae..09aa6732 100644 --- a/wire/msginv_test.go +++ b/wire/msginv_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestInv tests the MsgInv API. diff --git a/wire/msgmerkleblock.go b/wire/msgmerkleblock.go index d2ee4721..075f3d56 100644 --- a/wire/msgmerkleblock.go +++ b/wire/msgmerkleblock.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // maxFlagsPerMerkleBlock is the maximum number of flag bytes that could diff --git a/wire/msgmerkleblock_test.go b/wire/msgmerkleblock_test.go index 9837f8a9..31f01a47 100644 --- a/wire/msgmerkleblock_test.go +++ b/wire/msgmerkleblock_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestMerkleBlock tests the MsgMerkleBlock API. diff --git a/wire/msgnotfound_test.go b/wire/msgnotfound_test.go index 69b9d07a..7cb6cf7b 100644 --- a/wire/msgnotfound_test.go +++ b/wire/msgnotfound_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestNotFound tests the MsgNotFound API. diff --git a/wire/msgreject.go b/wire/msgreject.go index a00eeff6..ee64c747 100644 --- a/wire/msgreject.go +++ b/wire/msgreject.go @@ -8,7 +8,7 @@ import ( "fmt" "io" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // RejectCode represents a numeric value by which a remote peer indicates diff --git a/wire/msgtx.go b/wire/msgtx.go index 1e2f69fa..34bdeaed 100644 --- a/wire/msgtx.go +++ b/wire/msgtx.go @@ -10,7 +10,7 @@ import ( "io" "strconv" - "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) const ( diff --git a/wire/msgtx_test.go b/wire/msgtx_test.go index 66965043..11f67293 100644 --- a/wire/msgtx_test.go +++ b/wire/msgtx_test.go @@ -11,8 +11,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" + "github.com/lbryio/lbcd/chaincfg/chainhash" ) // TestTx tests the MsgTx API.