diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index accb239d2..b500f44df 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-16.04, macos-10.15 ] + os: [ ubuntu-16.04, macos-10.15, windows-2019 ] name: Testing on on ${{ matrix.os }} steps: diff --git a/cmd/kaspawallet/keys/get_password.go b/cmd/kaspawallet/keys/get_password.go index 64143da43..66b7e9755 100644 --- a/cmd/kaspawallet/keys/get_password.go +++ b/cmd/kaspawallet/keys/get_password.go @@ -11,7 +11,7 @@ import ( // getPassword was adapted from https://gist.github.com/jlinoff/e8e26b4ffa38d379c7f1891fd174a6d0#file-getpassword2-go func getPassword(prompt string) []byte { // Get the initial state of the terminal. - initialTermState, e1 := term.GetState(syscall.Stdin) + initialTermState, e1 := term.GetState(int(syscall.Stdin)) if e1 != nil { panic(e1) } @@ -22,13 +22,13 @@ func getPassword(prompt string) []byte { signal.Notify(c, os.Interrupt, os.Kill) go func() { <-c - _ = term.Restore(syscall.Stdin, initialTermState) + _ = term.Restore(int(syscall.Stdin), initialTermState) os.Exit(1) }() // Now get the password. fmt.Print(prompt) - p, err := term.ReadPassword(syscall.Stdin) + p, err := term.ReadPassword(int(syscall.Stdin)) fmt.Println() if err != nil { panic(err) diff --git a/infrastructure/network/addressmanager/addressmanager_test.go b/infrastructure/network/addressmanager/addressmanager_test.go index dfb2caea8..bc4dd6c14 100644 --- a/infrastructure/network/addressmanager/addressmanager_test.go +++ b/infrastructure/network/addressmanager/addressmanager_test.go @@ -5,14 +5,14 @@ package addressmanager import ( - "github.com/kaspanet/kaspad/app/appmessage" - "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" - "github.com/kaspanet/kaspad/util/mstime" "net" "reflect" "testing" + "github.com/kaspanet/kaspad/app/appmessage" "github.com/kaspanet/kaspad/infrastructure/config" + "github.com/kaspanet/kaspad/infrastructure/db/database/ldb" + "github.com/kaspanet/kaspad/util/mstime" ) func newAddressManagerForTest(t *testing.T, testName string) (addressManager *AddressManager, teardown func()) { @@ -274,6 +274,7 @@ func TestRestoreAddressManager(t *testing.T) { if err != nil { t.Fatalf("Could not create a database: %s", err) } + defer database.Close() // Recreate an addressManager with a the previous database addressManager, err = New(NewConfig(cfg), database) diff --git a/infrastructure/os/winservice/service_windows.go b/infrastructure/os/winservice/service_windows.go index 4b88c7124..887ed3ce5 100644 --- a/infrastructure/os/winservice/service_windows.go +++ b/infrastructure/os/winservice/service_windows.go @@ -114,6 +114,6 @@ func (s *Service) logServiceStart() { var message string message += fmt.Sprintf("%s version %s\n", s.description.DisplayName, version.Version()) message += fmt.Sprintf("Configuration file: %s\n", s.cfg.ConfigFile) - message += fmt.Sprintf("Data directory: %s\n", s.cfg.DataDir) + message += fmt.Sprintf("Application directory: %s\n", s.cfg.AppDir) message += fmt.Sprintf("Logs directory: %s\n", s.cfg.LogDir) } diff --git a/stability-tests/mempool-limits/config.go b/stability-tests/mempool-limits/config.go index 59e9db758..bbb00fd3c 100644 --- a/stability-tests/mempool-limits/config.go +++ b/stability-tests/mempool-limits/config.go @@ -1,4 +1,4 @@ -package main +package mempoollimits import ( "path/filepath" diff --git a/stability-tests/mempool-limits/log.go b/stability-tests/mempool-limits/log.go index 8dd27f1b7..c6069cd44 100644 --- a/stability-tests/mempool-limits/log.go +++ b/stability-tests/mempool-limits/log.go @@ -1,4 +1,4 @@ -package main +package mempoollimits import ( "fmt" diff --git a/stability-tests/mempool-limits/main_test.go b/stability-tests/mempool-limits/main_test.go index 09300ad9c..f95103f78 100644 --- a/stability-tests/mempool-limits/main_test.go +++ b/stability-tests/mempool-limits/main_test.go @@ -1,4 +1,4 @@ -package main +package mempoollimits import ( "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" diff --git a/stability-tests/mempool-limits/transactions.go b/stability-tests/mempool-limits/transactions.go index 3c4c840ff..3f69f6456 100644 --- a/stability-tests/mempool-limits/transactions.go +++ b/stability-tests/mempool-limits/transactions.go @@ -1,4 +1,4 @@ -package main +package mempoollimits import ( "encoding/hex" diff --git a/testing/integration/rpc_test.go b/testing/integration/rpc_test.go index 3d07a1959..e4bc9ec0b 100644 --- a/testing/integration/rpc_test.go +++ b/testing/integration/rpc_test.go @@ -1,11 +1,12 @@ package integration import ( - "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" "time" + + "github.com/kaspanet/kaspad/infrastructure/network/rpcclient" ) -const rpcTimeout = 1 * time.Second +const rpcTimeout = 10 * time.Second type testRPCClient struct { *rpcclient.RPCClient