mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* Add windows to the CI * Cast syscall.Stdin into an integer * DataDir -> AppDir in service_windows.go * Rename mempool-limits package to something non-main * Close database after re-assigining to it * Up rpcTimout to 10 seconds
26 lines
447 B
Go
26 lines
447 B
Go
package integration
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/kaspanet/kaspad/infrastructure/network/rpcclient"
|
|
)
|
|
|
|
const rpcTimeout = 10 * time.Second
|
|
|
|
type testRPCClient struct {
|
|
*rpcclient.RPCClient
|
|
}
|
|
|
|
func newTestRPCClient(rpcAddress string) (*testRPCClient, error) {
|
|
rpcClient, err := rpcclient.NewRPCClient(rpcAddress)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
rpcClient.SetTimeout(rpcTimeout)
|
|
|
|
return &testRPCClient{
|
|
RPCClient: rpcClient,
|
|
}, nil
|
|
}
|