Skip to content

Instantly share code, notes, and snippets.

@starius
starius / -
Created September 24, 2017 13:41
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# i686-w64-mingw32.shared/LICENSE
# i686-w64-mingw32.shared/bin/libopencv_calib3d.dll
# i686-w64-mingw32.shared/bin/libopencv_core.dll
# i686-w64-mingw32.shared/bin/libopencv_dnn.dll
# i686-w64-mingw32.shared/bin/libopencv_features2d.dll
# i686-w64-mingw32.shared/bin/libopencv_flann.dll
make[1]: Entering directory `/home/mxe/mxe-opencv-330'
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule.
uname -a
Linux sd-68075 3.2.0-4-amd64 #1 SMP Debian 3.2.89-2 x86_64 GNU/Linux
git log --pretty=tformat:"%H - %s [%ar] [%d]" -1
1a312a16f9bf8bef2a96be53e6bb1b2578b50fef - Update opencv to 3.3.0 [20 hours ago] [ (HEAD, tt)]
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
Distributor ID: Debian
Description: Debian GNU/Linux 7.11 (wheezy)
Release: 7.11
package api
// Files provides key-value storage with append-only values.
type Files interface {
// Open return file descriptor of the given file name.
// `existing=true` tells that the file is required to exist already.
// `existing=false` tells that the file is required to not exist.
// `write` and `read` tells if the file is being opened for read and for write.
// `replication` describes replication requirements for the file.
Open(name string, existing bool, write, read bool, replication string) (int64, error)
package main
import (
"crypto/aes"
"fmt"
"time"
"golang.org/x/crypto/twofish"
)
package api
type Files interface {
Open(name string, existing bool, write, read bool, replication string) (int64, error)
Close(fd int64) error
SizeOf(fd int64) (int64, error)
Append(fd int64, data []byte) error
ReadAt(fd int64, offset int64, size int) ([]byte, error)
List() (map[string]int64, error)
Delete(name string) error
package main
import (
"crypto/aes"
"fmt"
"time"
"golang.org/x/crypto/twofish"
)
package main
import (
"fmt"
"sync"
"time"
)
const n = 1000000000
package main
import (
"flag"
"io"
"log"
"net/http"
"time"
)
package main
import (
"bytes"
"encoding/binary"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
diff --git a/modules/host/contractmanager/sector.go b/modules/host/contractmanager/sector.go
index f8ba8ba..cdfb532 100644
--- a/modules/host/contractmanager/sector.go
+++ b/modules/host/contractmanager/sector.go
@@ -63,17 +63,22 @@ type (
}
)
-// readSector will read the sector in the file, starting from the provided
-// location.