]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/ctx.go
Sequential MTH optimization
[nncp.git] / src / ctx.go
index fb26185fbb3af9e4ee6024f8af805d1c2c2e7ee2..cb5c4282b868627e32691fe1e78aff346891bfa5 100644 (file)
@@ -36,6 +36,9 @@ type Ctx struct {
        Neigh  map[NodeId]*Node
        Alias  map[string]*NodeId
 
+       AreaId2Area map[AreaId]*Area
+       AreaName2Id map[string]*AreaId
+
        Spool      string
        LogPath    string
        UmaskForce *int
@@ -135,7 +138,7 @@ func CtxFromCmdline(
 func (ctx *Ctx) IsEnoughSpace(want int64) bool {
        var s unix.Statfs_t
        if err := unix.Statfs(ctx.Spool, &s); err != nil {
-               log.Fatalln(err)
+               log.Fatalln("Can not stat spool:", err)
        }
        return int64(s.Bavail)*int64(s.Bsize) > want
 }