From 915b22515ff9d3f295b7076e0718b5b78ab35859 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Mon, 14 Mar 2022 14:43:53 +0100 Subject: [PATCH] multi: sort imports, fix formatting --- blockchain/accept.go | 2 +- blockchain/chain_test.go | 2 +- blockchain/chainio.go | 2 +- blockchain/checkpoints.go | 2 +- blockchain/example_test.go | 2 +- blockchain/fullblocks_test.go | 2 +- blockchain/indexers/blocklogger.go | 2 +- blockchain/indexers/cfindex.go | 6 +++--- blockchain/indexers/common.go | 2 +- blockchain/indexers/manager.go | 2 +- blockchain/indexers/txindex.go | 2 +- blockchain/merkle.go | 2 +- blockchain/process.go | 2 +- blockchain/scriptval.go | 2 +- blockchain/utxoviewpoint.go | 2 +- blockchain/validate.go | 2 +- blockchain/validate_test.go | 2 +- blockchain/weight.go | 2 +- btcjson/chainsvrresults_test.go | 2 +- btcutil/address/base58/genalphabet.go | 3 ++- btcutil/block_test.go | 2 +- btcutil/bloom/example_test.go | 2 +- btcutil/bloom/filter.go | 2 +- btcutil/bloom/merkleblock_test.go | 4 ++-- btcutil/coinset/coins.go | 2 +- btcutil/coinset/coins_test.go | 4 ++-- btcutil/gcs/builder/builder.go | 2 +- btcutil/hdkeychain/example_test.go | 2 +- btcutil/net.go | 1 + btcutil/net_noop.go | 1 + btcutil/tx_test.go | 2 +- btcutil/txsort/txsort_test.go | 2 +- cmd/addblock/config.go | 2 +- cmd/addblock/import.go | 2 +- cmd/btcctl/config.go | 2 +- cmd/findcheckpoint/config.go | 2 +- database/cmd/dbtool/globalconfig.go | 2 +- database/cmd/dbtool/insecureimport.go | 2 +- database/ffldb/bench_test.go | 2 +- database/ffldb/db.go | 2 +- database/ffldb/driver_test.go | 2 +- database/ffldb/interface_test.go | 2 +- database/ffldb/whitebox_test.go | 2 +- database/interface.go | 2 +- integration/rpctest/node.go | 2 +- integration/rpctest/rpc_harness_test.go | 2 +- limits/limits_unix.go | 1 + mempool/estimatefee.go | 2 +- mempool/estimatefee_test.go | 2 +- mempool/mempool.go | 2 +- mempool/policy.go | 2 +- mining/policy.go | 2 +- mining/policy_test.go | 2 +- netsync/blocklogger.go | 2 +- netsync/interface.go | 2 +- netsync/manager.go | 2 +- rpcadapters.go | 2 +- rpcclient/example_test.go | 1 + rpcclient/examples/btcdwebsockets/main.go | 2 +- rpcclient/examples/btcwalletwebsockets/main.go | 2 +- server.go | 4 ++-- signalsigterm.go | 1 + 62 files changed, 68 insertions(+), 62 deletions(-) diff --git a/blockchain/accept.go b/blockchain/accept.go index 44ccbf997a..935963148f 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/btcd/btcutil" + "github.com/btcsuite/btcd/database" ) // maybeAcceptBlock potentially accepts a block into the block chain and, if diff --git a/blockchain/chain_test.go b/blockchain/chain_test.go index 34356326b9..6569b7ec86 100644 --- a/blockchain/chain_test.go +++ b/blockchain/chain_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // TestHaveBlock tests the HaveBlock API to ensure proper functionality. diff --git a/blockchain/chainio.go b/blockchain/chainio.go index fa41254da6..e7a7c30c76 100644 --- a/blockchain/chainio.go +++ b/blockchain/chainio.go @@ -12,10 +12,10 @@ import ( "sync" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) const ( diff --git a/blockchain/checkpoints.go b/blockchain/checkpoints.go index dbfa9d146d..1beb657f53 100644 --- a/blockchain/checkpoints.go +++ b/blockchain/checkpoints.go @@ -8,10 +8,10 @@ import ( "fmt" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/btcutil" ) // CheckpointConfirmations is the number of blocks before the end of the current diff --git a/blockchain/example_test.go b/blockchain/example_test.go index 7f15e59bc6..8db570273d 100644 --- a/blockchain/example_test.go +++ b/blockchain/example_test.go @@ -11,10 +11,10 @@ import ( "path/filepath" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" _ "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/btcutil" ) // 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 3cc7c87b70..d6bcf799af 100644 --- a/blockchain/fullblocks_test.go +++ b/blockchain/fullblocks_test.go @@ -14,13 +14,13 @@ import ( "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/blockchain/fullblocktests" + "github.com/btcsuite/btcd/btcutil" "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/btcd/btcutil" ) const ( diff --git a/blockchain/indexers/blocklogger.go b/blockchain/indexers/blocklogger.go index 3671c0162a..365cf88b8d 100644 --- a/blockchain/indexers/blocklogger.go +++ b/blockchain/indexers/blocklogger.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "github.com/btcsuite/btclog" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btclog" ) // blockProgressLogger provides periodic logging for other services in order diff --git a/blockchain/indexers/cfindex.go b/blockchain/indexers/cfindex.go index fa0ee3c0a6..21b4bf4632 100644 --- a/blockchain/indexers/cfindex.go +++ b/blockchain/indexers/cfindex.go @@ -8,13 +8,13 @@ import ( "errors" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/gcs" + "github.com/btcsuite/btcd/btcutil/gcs/builder" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/gcs" - "github.com/btcsuite/btcd/btcutil/gcs/builder" ) const ( diff --git a/blockchain/indexers/common.go b/blockchain/indexers/common.go index 07b2feca5d..89ce6720b5 100644 --- a/blockchain/indexers/common.go +++ b/blockchain/indexers/common.go @@ -12,8 +12,8 @@ import ( "errors" "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/database" ) var ( diff --git a/blockchain/indexers/manager.go b/blockchain/indexers/manager.go index 8c87ca0771..b4487e60fd 100644 --- a/blockchain/indexers/manager.go +++ b/blockchain/indexers/manager.go @@ -9,10 +9,10 @@ import ( "fmt" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) var ( diff --git a/blockchain/indexers/txindex.go b/blockchain/indexers/txindex.go index f1d734e06b..f7d4bf60a3 100644 --- a/blockchain/indexers/txindex.go +++ b/blockchain/indexers/txindex.go @@ -9,10 +9,10 @@ import ( "fmt" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) const ( diff --git a/blockchain/merkle.go b/blockchain/merkle.go index d7e567b283..2d5dd309c7 100644 --- a/blockchain/merkle.go +++ b/blockchain/merkle.go @@ -9,9 +9,9 @@ import ( "fmt" "math" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" - "github.com/btcsuite/btcd/btcutil" ) const ( diff --git a/blockchain/process.go b/blockchain/process.go index c367b4ceff..64d5c1e14f 100644 --- a/blockchain/process.go +++ b/blockchain/process.go @@ -8,9 +8,9 @@ import ( "fmt" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/btcutil" ) // BehaviorFlags is a bitmask defining tweaks to the normal behavior when diff --git a/blockchain/scriptval.go b/blockchain/scriptval.go index 8869e23f27..0aaf3195c8 100644 --- a/blockchain/scriptval.go +++ b/blockchain/scriptval.go @@ -10,9 +10,9 @@ import ( "runtime" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // txValidateItem holds a transaction along with which input to validate. diff --git a/blockchain/utxoviewpoint.go b/blockchain/utxoviewpoint.go index 3398693225..d4a697dc3e 100644 --- a/blockchain/utxoviewpoint.go +++ b/blockchain/utxoviewpoint.go @@ -7,11 +7,11 @@ package blockchain import ( "fmt" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // txoFlags is a bitmask defining additional information and state for a diff --git a/blockchain/validate.go b/blockchain/validate.go index 575861e2d3..af46facfd5 100644 --- a/blockchain/validate.go +++ b/blockchain/validate.go @@ -11,11 +11,11 @@ import ( "math/big" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) const ( diff --git a/blockchain/validate_test.go b/blockchain/validate_test.go index d5d17781d3..1963a41590 100644 --- a/blockchain/validate_test.go +++ b/blockchain/validate_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // TestSequenceLocksActive tests the SequenceLockActive function to ensure it diff --git a/blockchain/weight.go b/blockchain/weight.go index 5a6f257be5..1b691f0086 100644 --- a/blockchain/weight.go +++ b/blockchain/weight.go @@ -7,9 +7,9 @@ package blockchain import ( "fmt" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) const ( diff --git a/btcjson/chainsvrresults_test.go b/btcjson/chainsvrresults_test.go index aee514a9a4..7163a9a9a0 100644 --- a/btcjson/chainsvrresults_test.go +++ b/btcjson/chainsvrresults_test.go @@ -10,8 +10,8 @@ import ( "testing" "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" ) diff --git a/btcutil/address/base58/genalphabet.go b/btcutil/address/base58/genalphabet.go index 010cbee39e..959f34d4e2 100644 --- a/btcutil/address/base58/genalphabet.go +++ b/btcutil/address/base58/genalphabet.go @@ -2,7 +2,8 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. -//+build ignore +//go:build ignore +// +build ignore package main diff --git a/btcutil/block_test.go b/btcutil/block_test.go index e24b9842f7..06e0ad2803 100644 --- a/btcutil/block_test.go +++ b/btcutil/block_test.go @@ -11,9 +11,9 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" "github.com/davecgh/go-spew/spew" ) diff --git a/btcutil/bloom/example_test.go b/btcutil/bloom/example_test.go index bcd5d0190b..e5a148a5ba 100644 --- a/btcutil/bloom/example_test.go +++ b/btcutil/bloom/example_test.go @@ -9,9 +9,9 @@ import ( "math/rand" "time" + "github.com/btcsuite/btcd/btcutil/bloom" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil/bloom" ) // This example demonstrates how to create a new bloom filter, add a transaction diff --git a/btcutil/bloom/filter.go b/btcutil/bloom/filter.go index 8c4527ea29..2eca228570 100644 --- a/btcutil/bloom/filter.go +++ b/btcutil/bloom/filter.go @@ -9,10 +9,10 @@ import ( "math" "sync" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // ln2Squared is simply the square of the natural log of 2. diff --git a/btcutil/bloom/merkleblock_test.go b/btcutil/bloom/merkleblock_test.go index 15e21a4bb7..ae7b1f3430 100644 --- a/btcutil/bloom/merkleblock_test.go +++ b/btcutil/bloom/merkleblock_test.go @@ -9,10 +9,10 @@ import ( "encoding/hex" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/btcutil/bloom" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/wire" ) func TestMerkleBlock3(t *testing.T) { diff --git a/btcutil/coinset/coins.go b/btcutil/coinset/coins.go index 9d813418b6..872a5401c9 100644 --- a/btcutil/coinset/coins.go +++ b/btcutil/coinset/coins.go @@ -9,9 +9,9 @@ import ( "errors" "sort" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // Coin represents a spendable transaction outpoint diff --git a/btcutil/coinset/coins_test.go b/btcutil/coinset/coins_test.go index 874dc6c6d6..035a40cb99 100644 --- a/btcutil/coinset/coins_test.go +++ b/btcutil/coinset/coins_test.go @@ -11,10 +11,10 @@ import ( "fmt" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/btcutil/coinset" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/wire" ) type TestCoin struct { diff --git a/btcutil/gcs/builder/builder.go b/btcutil/gcs/builder/builder.go index 6f15ec7a68..af05f819a5 100644 --- a/btcutil/gcs/builder/builder.go +++ b/btcutil/gcs/builder/builder.go @@ -10,10 +10,10 @@ import ( "fmt" "math" + "github.com/btcsuite/btcd/btcutil/gcs" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil/gcs" ) const ( diff --git a/btcutil/hdkeychain/example_test.go b/btcutil/hdkeychain/example_test.go index 7489d387a7..8ea4244df1 100644 --- a/btcutil/hdkeychain/example_test.go +++ b/btcutil/hdkeychain/example_test.go @@ -7,8 +7,8 @@ package hdkeychain_test import ( "fmt" - "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/btcutil/hdkeychain" + "github.com/btcsuite/btcd/chaincfg" ) // This example demonstrates how to generate a cryptographically random seed diff --git a/btcutil/net.go b/btcutil/net.go index bf11733c64..ec5638622b 100644 --- a/btcutil/net.go +++ b/btcutil/net.go @@ -2,6 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. +//go:build !appengine // +build !appengine package btcutil diff --git a/btcutil/net_noop.go b/btcutil/net_noop.go index b0b7c2e40a..ae9c1f5fb9 100644 --- a/btcutil/net_noop.go +++ b/btcutil/net_noop.go @@ -2,6 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. +//go:build appengine // +build appengine package btcutil diff --git a/btcutil/tx_test.go b/btcutil/tx_test.go index 828fc065b1..71b7488e9d 100644 --- a/btcutil/tx_test.go +++ b/btcutil/tx_test.go @@ -10,8 +10,8 @@ import ( "reflect" "testing" - "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/davecgh/go-spew/spew" ) diff --git a/btcutil/txsort/txsort_test.go b/btcutil/txsort/txsort_test.go index 7d5c2d3eaf..dd2149294e 100644 --- a/btcutil/txsort/txsort_test.go +++ b/btcutil/txsort/txsort_test.go @@ -11,8 +11,8 @@ import ( "path/filepath" "testing" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/btcutil/txsort" + "github.com/btcsuite/btcd/wire" ) // TestSort ensures the transaction sorting works according to the BIP. diff --git a/cmd/addblock/config.go b/cmd/addblock/config.go index c638196534..ffcc0eca79 100644 --- a/cmd/addblock/config.go +++ b/cmd/addblock/config.go @@ -9,11 +9,11 @@ import ( "os" "path/filepath" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" _ "github.com/btcsuite/btcd/database/ffldb" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" flags "github.com/jessevdk/go-flags" ) diff --git a/cmd/addblock/import.go b/cmd/addblock/import.go index 4875ce11cb..7f4b9bb0f5 100644 --- a/cmd/addblock/import.go +++ b/cmd/addblock/import.go @@ -13,10 +13,10 @@ import ( "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/blockchain/indexers" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) var zeroHash = chainhash.Hash{} diff --git a/cmd/btcctl/config.go b/cmd/btcctl/config.go index 3db735c5d8..3a21be2d19 100644 --- a/cmd/btcctl/config.go +++ b/cmd/btcctl/config.go @@ -14,8 +14,8 @@ import ( "strings" "github.com/btcsuite/btcd/btcjson" - "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" flags "github.com/jessevdk/go-flags" ) diff --git a/cmd/findcheckpoint/config.go b/cmd/findcheckpoint/config.go index 5671b5b186..203ed27faf 100644 --- a/cmd/findcheckpoint/config.go +++ b/cmd/findcheckpoint/config.go @@ -9,11 +9,11 @@ import ( "os" "path/filepath" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" _ "github.com/btcsuite/btcd/database/ffldb" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" flags "github.com/jessevdk/go-flags" ) diff --git a/database/cmd/dbtool/globalconfig.go b/database/cmd/dbtool/globalconfig.go index 2ec746a43d..4e58168a33 100644 --- a/database/cmd/dbtool/globalconfig.go +++ b/database/cmd/dbtool/globalconfig.go @@ -10,11 +10,11 @@ import ( "os" "path/filepath" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" _ "github.com/btcsuite/btcd/database/ffldb" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) var ( diff --git a/database/cmd/dbtool/insecureimport.go b/database/cmd/dbtool/insecureimport.go index a01c74bb55..744e29f57b 100644 --- a/database/cmd/dbtool/insecureimport.go +++ b/database/cmd/dbtool/insecureimport.go @@ -12,10 +12,10 @@ import ( "sync" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // importCmd defines the configuration options for the insecureimport command. diff --git a/database/ffldb/bench_test.go b/database/ffldb/bench_test.go index f4a0eb32e5..95e498b274 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/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" - "github.com/btcsuite/btcd/btcutil" ) // BenchmarkBlockHeader benchmarks how long it takes to load the mainnet genesis diff --git a/database/ffldb/db.go b/database/ffldb/db.go index f571d3889b..c0e2bb3a6a 100644 --- a/database/ffldb/db.go +++ b/database/ffldb/db.go @@ -14,11 +14,11 @@ import ( "sort" "sync" + "github.com/btcsuite/btcd/btcutil" "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/btcd/btcutil" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/comparer" ldberrors "github.com/syndtr/goleveldb/leveldb/errors" diff --git a/database/ffldb/driver_test.go b/database/ffldb/driver_test.go index ef35f07840..29d31eafc4 100644 --- a/database/ffldb/driver_test.go +++ b/database/ffldb/driver_test.go @@ -11,10 +11,10 @@ import ( "reflect" "testing" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/database/ffldb" - "github.com/btcsuite/btcd/btcutil" ) // dbType is the database type name for this driver. diff --git a/database/ffldb/interface_test.go b/database/ffldb/interface_test.go index af26faccab..58b4ab15e5 100644 --- a/database/ffldb/interface_test.go +++ b/database/ffldb/interface_test.go @@ -25,11 +25,11 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) var ( diff --git a/database/ffldb/whitebox_test.go b/database/ffldb/whitebox_test.go index f2eae8ce09..cc7c13d45f 100644 --- a/database/ffldb/whitebox_test.go +++ b/database/ffldb/whitebox_test.go @@ -17,10 +17,10 @@ import ( "path/filepath" "testing" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/database" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" "github.com/syndtr/goleveldb/leveldb" ldberrors "github.com/syndtr/goleveldb/leveldb/errors" ) diff --git a/database/interface.go b/database/interface.go index aa88cc3723..d4f1d89d2e 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/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg/chainhash" ) // Cursor represents a cursor over key/value pairs and nested buckets of a diff --git a/integration/rpctest/node.go b/integration/rpctest/node.go index be52a15404..f9e0d4c152 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/btcd/btcutil" + rpc "github.com/btcsuite/btcd/rpcclient" ) // nodeConfig contains all the args, and data required to launch a btcd process diff --git a/integration/rpctest/rpc_harness_test.go b/integration/rpctest/rpc_harness_test.go index baadd35f5e..978f8d8290 100644 --- a/integration/rpctest/rpc_harness_test.go +++ b/integration/rpctest/rpc_harness_test.go @@ -14,11 +14,11 @@ import ( "testing" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) func testSendOutputs(r *Harness, t *testing.T) { diff --git a/limits/limits_unix.go b/limits/limits_unix.go index 7ebf866789..7972b05e20 100644 --- a/limits/limits_unix.go +++ b/limits/limits_unix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. +//go:build !windows && !plan9 // +build !windows,!plan9 package limits diff --git a/mempool/estimatefee.go b/mempool/estimatefee.go index a71ce42f12..2d1794b797 100644 --- a/mempool/estimatefee.go +++ b/mempool/estimatefee.go @@ -16,9 +16,9 @@ import ( "strings" "sync" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/mining" - "github.com/btcsuite/btcd/btcutil" ) // TODO incorporate Alex Morcos' modifications to Gavin's initial model diff --git a/mempool/estimatefee_test.go b/mempool/estimatefee_test.go index c5ea85c635..c1e0906096 100644 --- a/mempool/estimatefee_test.go +++ b/mempool/estimatefee_test.go @@ -9,10 +9,10 @@ import ( "math/rand" "testing" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/mining" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // newTestFeeEstimator creates a feeEstimator with some different parameters diff --git a/mempool/mempool.go b/mempool/mempool.go index f830a51382..d08cfd92c3 100644 --- a/mempool/mempool.go +++ b/mempool/mempool.go @@ -15,12 +15,12 @@ import ( "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/blockchain/indexers" "github.com/btcsuite/btcd/btcjson" + "github.com/btcsuite/btcd/btcutil" "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/btcd/btcutil" ) const ( diff --git a/mempool/policy.go b/mempool/policy.go index edba16ac2e..983d72cd45 100644 --- a/mempool/policy.go +++ b/mempool/policy.go @@ -9,9 +9,9 @@ import ( "time" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) const ( diff --git a/mining/policy.go b/mining/policy.go index f8ce411602..6213c2b336 100644 --- a/mining/policy.go +++ b/mining/policy.go @@ -6,8 +6,8 @@ package mining import ( "github.com/btcsuite/btcd/blockchain" - "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/wire" ) const ( diff --git a/mining/policy_test.go b/mining/policy_test.go index 0a362f5471..cc2fdfbfb2 100644 --- a/mining/policy_test.go +++ b/mining/policy_test.go @@ -9,9 +9,9 @@ import ( "testing" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) // newHashFromStr converts the passed big-endian hex string into a diff --git a/netsync/blocklogger.go b/netsync/blocklogger.go index 788192ccb2..20f30f325b 100644 --- a/netsync/blocklogger.go +++ b/netsync/blocklogger.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "github.com/btcsuite/btclog" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btclog" ) // blockProgressLogger provides periodic logging for other services in order diff --git a/netsync/interface.go b/netsync/interface.go index 2ce479bf2d..6a873bd888 100644 --- a/netsync/interface.go +++ b/netsync/interface.go @@ -6,12 +6,12 @@ package netsync import ( "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "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/btcd/btcutil" ) // PeerNotifier exposes methods to notify peers of status changes to diff --git a/netsync/manager.go b/netsync/manager.go index a297bb3f24..523437a0c5 100644 --- a/netsync/manager.go +++ b/netsync/manager.go @@ -13,13 +13,13 @@ import ( "time" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "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/btcd/btcutil" ) const ( diff --git a/rpcadapters.go b/rpcadapters.go index 02d33710ac..eb808876a9 100644 --- a/rpcadapters.go +++ b/rpcadapters.go @@ -8,12 +8,12 @@ import ( "sync/atomic" "github.com/btcsuite/btcd/blockchain" + "github.com/btcsuite/btcd/btcutil" "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/btcd/btcutil" ) // rpcPeer provides a peer for use with the RPC server and implements the diff --git a/rpcclient/example_test.go b/rpcclient/example_test.go index 9ba9adadef..9b3ac0f36c 100644 --- a/rpcclient/example_test.go +++ b/rpcclient/example_test.go @@ -6,6 +6,7 @@ package rpcclient import ( "fmt" + "github.com/btcsuite/btcd/btcjson" ) diff --git a/rpcclient/examples/btcdwebsockets/main.go b/rpcclient/examples/btcdwebsockets/main.go index 1f18b9aab4..e3f4c13e40 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/btcutil" "github.com/btcsuite/btcd/rpcclient" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" ) func main() { diff --git a/rpcclient/examples/btcwalletwebsockets/main.go b/rpcclient/examples/btcwalletwebsockets/main.go index 7f177e0b1f..3cbd9a3667 100644 --- a/rpcclient/examples/btcwalletwebsockets/main.go +++ b/rpcclient/examples/btcwalletwebsockets/main.go @@ -10,8 +10,8 @@ import ( "path/filepath" "time" - "github.com/btcsuite/btcd/rpcclient" "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/rpcclient" "github.com/davecgh/go-spew/spew" ) diff --git a/server.go b/server.go index 45bfb17ee4..950668586d 100644 --- a/server.go +++ b/server.go @@ -25,6 +25,8 @@ import ( "github.com/btcsuite/btcd/addrmgr" "github.com/btcsuite/btcd/blockchain" "github.com/btcsuite/btcd/blockchain/indexers" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/btcutil/bloom" "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/connmgr" @@ -36,8 +38,6 @@ import ( "github.com/btcsuite/btcd/peer" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btcd/btcutil" - "github.com/btcsuite/btcd/btcutil/bloom" ) const ( diff --git a/signalsigterm.go b/signalsigterm.go index 831655010e..63bdb9c01d 100644 --- a/signalsigterm.go +++ b/signalsigterm.go @@ -2,6 +2,7 @@ // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. +//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris // +build darwin dragonfly freebsd linux netbsd openbsd solaris package main