mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
18c00ab25d
* Make bolt timeout a config value * Merge refs/heads/master into best-practices0timeout * Merge refs/heads/master into best-practices0timeout * Merge refs/heads/master into best-practices0timeout
26 lines
706 B
Go
26 lines
706 B
Go
package params
|
|
|
|
import (
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
// IoConfig defines the shared io parameters.
|
|
type IoConfig struct {
|
|
ReadWritePermissions os.FileMode
|
|
ReadWriteExecutePermissions os.FileMode
|
|
BoltTimeout time.Duration
|
|
}
|
|
|
|
var defaultIoConfig = &IoConfig{
|
|
ReadWritePermissions: 0600, //-rw------- Read and Write permissions for user
|
|
ReadWriteExecutePermissions: 0700, //-rwx------ Read Write and Execute (traverse) permissions for user
|
|
BoltTimeout: 1 * time.Second, // 1 second for the bolt DB to timeout.
|
|
}
|
|
|
|
// BeaconIoConfig returns the current io config for
|
|
// the beacon chain.
|
|
func BeaconIoConfig() *IoConfig {
|
|
return defaultIoConfig
|
|
}
|