goimports -w .
This commit is contained in:
parent
73ed07bd85
commit
4772d4a1a4
19 changed files with 46 additions and 27 deletions
|
@ -6,6 +6,7 @@ package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
9
chain.go
9
chain.go
|
@ -8,14 +8,15 @@ import (
|
||||||
"container/list"
|
"container/list"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/conformal/btcdb"
|
|
||||||
"github.com/conformal/btcnet"
|
|
||||||
"github.com/conformal/btcutil"
|
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcdb"
|
||||||
|
"github.com/conformal/btcnet"
|
||||||
|
"github.com/conformal/btcutil"
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
package btcchain_test
|
package btcchain_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
"github.com/conformal/btcchain"
|
"github.com/conformal/btcchain"
|
||||||
"github.com/conformal/btcnet"
|
"github.com/conformal/btcnet"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"github.com/conformal/btcwire"
|
"github.com/conformal/btcwire"
|
||||||
"testing"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestHaveBlock tests the HaveBlock API to ensure proper functionality.
|
// TestHaveBlock tests the HaveBlock API to ensure proper functionality.
|
||||||
|
|
|
@ -6,6 +6,7 @@ package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/conformal/btcnet"
|
"github.com/conformal/btcnet"
|
||||||
"github.com/conformal/btcscript"
|
"github.com/conformal/btcscript"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
|
|
|
@ -6,14 +6,15 @@ package btcchain_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/conformal/btcchain"
|
"github.com/conformal/btcchain"
|
||||||
"github.com/conformal/btcdb"
|
"github.com/conformal/btcdb"
|
||||||
_ "github.com/conformal/btcdb/ldb"
|
_ "github.com/conformal/btcdb/ldb"
|
||||||
_ "github.com/conformal/btcdb/memdb"
|
_ "github.com/conformal/btcdb/memdb"
|
||||||
"github.com/conformal/btcnet"
|
"github.com/conformal/btcnet"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// testDbType is the database backend type to use for the tests.
|
// testDbType is the database backend type to use for the tests.
|
||||||
|
|
|
@ -6,9 +6,10 @@ package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
package btcchain_test
|
package btcchain_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcchain"
|
|
||||||
"math/big"
|
"math/big"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcchain"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBigToCompact(t *testing.T) {
|
func TestBigToCompact(t *testing.T) {
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
package btcchain_test
|
package btcchain_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcchain"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcchain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestErrorCodeStringer tests the stringized output for the ErrorCode type.
|
// TestErrorCodeStringer tests the stringized output for the ErrorCode type.
|
||||||
|
|
|
@ -12,8 +12,9 @@ interface. The functions are only exported while the tests are being run.
|
||||||
package btcchain
|
package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcutil"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TstSetCoinbaseMaturity makes the ability to set the coinbase maturity
|
// TstSetCoinbaseMaturity makes the ability to set the coinbase maturity
|
||||||
|
|
3
log.go
3
log.go
|
@ -6,8 +6,9 @@ package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/conformal/btclog"
|
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
|
"github.com/conformal/btclog"
|
||||||
)
|
)
|
||||||
|
|
||||||
// log is a logger that is initialized with no output filters. This
|
// log is a logger that is initialized with no output filters. This
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
package btcchain
|
package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"math"
|
||||||
|
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"github.com/conformal/btcwire"
|
"github.com/conformal/btcwire"
|
||||||
"math"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// nextPowerOfTwo returns the next highest power of two from a given number if
|
// nextPowerOfTwo returns the next highest power of two from a given number if
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
package btcchain_test
|
package btcchain_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
"github.com/conformal/btcchain"
|
"github.com/conformal/btcchain"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"testing"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestMerkle tests the BuildMerkleTreeStore API.
|
// TestMerkle tests the BuildMerkleTreeStore API.
|
||||||
|
|
|
@ -6,6 +6,7 @@ package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"github.com/conformal/btcwire"
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,14 +7,15 @@ package btcchain_test
|
||||||
import (
|
import (
|
||||||
"compress/bzip2"
|
"compress/bzip2"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"github.com/conformal/btcchain"
|
|
||||||
"github.com/conformal/btcutil"
|
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/conformal/btcchain"
|
||||||
|
"github.com/conformal/btcutil"
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestReorganization loads a set of test blocks which force a chain
|
// TestReorganization loads a set of test blocks which force a chain
|
||||||
|
|
|
@ -6,11 +6,12 @@ package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
|
"runtime"
|
||||||
|
|
||||||
"github.com/conformal/btcscript"
|
"github.com/conformal/btcscript"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"github.com/conformal/btcwire"
|
"github.com/conformal/btcwire"
|
||||||
"math"
|
|
||||||
"runtime"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// txValidateItem holds a transaction along with which input to validate.
|
// txValidateItem holds a transaction along with which input to validate.
|
||||||
|
|
|
@ -5,11 +5,12 @@
|
||||||
package btcchain_test
|
package btcchain_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcchain"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcchain"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestTimeSorter tests the timeSorter implementation.
|
// TestTimeSorter tests the timeSorter implementation.
|
||||||
|
|
|
@ -6,6 +6,7 @@ package btcchain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/conformal/btcdb"
|
"github.com/conformal/btcdb"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"github.com/conformal/btcwire"
|
"github.com/conformal/btcwire"
|
||||||
|
|
|
@ -7,14 +7,15 @@ package btcchain
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
|
"math/big"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/conformal/btcdb"
|
"github.com/conformal/btcdb"
|
||||||
"github.com/conformal/btcnet"
|
"github.com/conformal/btcnet"
|
||||||
"github.com/conformal/btcscript"
|
"github.com/conformal/btcscript"
|
||||||
"github.com/conformal/btcutil"
|
"github.com/conformal/btcutil"
|
||||||
"github.com/conformal/btcwire"
|
"github.com/conformal/btcwire"
|
||||||
"math"
|
|
||||||
"math/big"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -5,14 +5,15 @@
|
||||||
package btcchain_test
|
package btcchain_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/conformal/btcchain"
|
|
||||||
"github.com/conformal/btcnet"
|
|
||||||
"github.com/conformal/btcutil"
|
|
||||||
"github.com/conformal/btcwire"
|
|
||||||
"math"
|
"math"
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/conformal/btcchain"
|
||||||
|
"github.com/conformal/btcnet"
|
||||||
|
"github.com/conformal/btcutil"
|
||||||
|
"github.com/conformal/btcwire"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestCheckConnectBlock tests the CheckConnectBlock function to ensure it
|
// TestCheckConnectBlock tests the CheckConnectBlock function to ensure it
|
||||||
|
|
Loading…
Reference in a new issue