System Environment WIN10
Note: The installation process may be slightly different for different Windows release versions
Environmental dependencies:
Go, GCC
Go Download Address: https://golang.org/dl/
The author downloads the 1.10.2.64-bit version:
Full Download Address: Https://dl.google.com/go/go1.10.2.windows-amd64.msi
Installation:
The author installs the path to the C:\Go directory. Add the C:\Go\bin to the environment variable.
Go version is executed in any directory, and the installation configuration is successful when the version number is displayed.
C:\users\tangshua>go version
Go version go1.10.2 windows/amd64
MinGW Download Address: https://sourceforge.net/projects/mingw-w64/
I download the full GW download address: https://jaist.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal% 20builds/mingw-builds/installer/mingw-w64-install.exe
Install MinGW:
The author installs in the D:\mingw-w64, after the installation completes as follows. Add the D:\mingw-w64\bin to the environment variable.
Spectrum installation
Download the source file
Https://github.com/SmartMeshFoundation/Spectrum
I put it on the D drive. Switch to the tests directory. Execute Go test-v
Other points:
To perform an error resolution:
1. Place the code in the Go directory.
C:\Go\src\github.com\SmartMeshFoundation\Spectrum
I found the following definition in the Block_test_util.go code, which may cause the corresponding class library can not be found and error.
Import ("bytes" "Encoding/hex" "Encoding/json" "FMT" "Math/big" "Github.com/smartmeshfoundation/spectrum/common" " Github.com/smartmeshfoundation/spectrum/common/hexutil "" Github.com/smartmeshfoundation/spectrum/common/math "" Github.com/smartmeshfoundation/spectrum/consensus/ethash "" Github.com/smartmeshfoundation/spectrum/core "" Github.com/smartmeshfoundation/spectrum/core/state "" Github.com/smartmeshfoundation/spectrum/core/types "" GITHUB.COM/SMARTMESHFOUNDATION/SPECTRUM/CORE/VM "" Github.com/smartmeshfoundation/spectrum/ethdb "" github.com/ Smartmeshfoundation/spectrum/params "" GITHUB.COM/SMARTMESHFOUNDATION/SPECTRUM/RLP ")
2. Create the TestData directory under the tests directory, and create it separately under the TestData directory
Blockchaintests,generalstatetests,transactiontests,vmtests,rlptests,basictests directory.
The author finds the following definition in the Init_test.go file:
var (baseDir = filepath. Join (".", "testdata") Blocktestdir = filepath. Join (BaseDir, "blockchaintests") Statetestdir = filepath. Join (BaseDir, "generalstatetests") Transactiontestdir = filepath. Join (BaseDir, "transactiontests") Vmtestdir = filepath. Join (BaseDir, "vmtests") Rlptestdir = filepath. Join (BaseDir, "rlptests") Difficultytestdir = filepath. Join (BaseDir, "basictests"))
But it was not found in the folder, so the folder was created manually.