Skip to content

Instantly share code, notes, and snippets.

@starius
starius / -
Created October 2, 2017 23:28
v github.com/NebulousLabs/bolt
v github.com/NebulousLabs/demotemutex
v github.com/NebulousLabs/entropy-mnemonics
v github.com/NebulousLabs/errors
v github.com/NebulousLabs/fastrand
v github.com/NebulousLabs/go-upnp
v github.com/NebulousLabs/merkletree
v github.com/NebulousLabs/muxado
v github.com/NebulousLabs/muxado/proto
v github.com/NebulousLabs/muxado/proto/buffer
@starius
starius / -
Created October 1, 2017 01:50
api/host_test.go: minFolderSizeString (line 24) and maxFolderSizeString (line 25) are not ordered.
api/host_test.go: tooSmallFolderString (line 26) and tooLargeFolderString (line 27) are not ordered.
api/host_test.go: tooLargeFolderString (line 27) and mediumSizeFolderString (line 28) are not ordered.
encoding/marshal_test.go: testStructs (line 74) and testEncodings (line 84) are not ordered.
modules/consensus/accept.go: errNoBlockMap (line 18) and errInconsistentSet (line 19) are not ordered.
modules/consensus/accept.go: errOrphan (line 20) and errNonLinearChain (line 21) are not ordered.
modules/consensus/accept_test.go: validateBlockParamsGot (line 19) and mockValidBlock (line 21) are not ordered.
modules/consensus/accept_test.go: mockValidBlock (line 21) and mockInvalidBlock (line 25) are not ordered.
modules/consensus/accept_test.go: parentBlockUnmarshaler (line 32) and parentBlockHighTargetUnmarshaler (line 38) are not ordered.
modules/consensus/accept_test.go: unmarshalFailedErr (line 50) and failingBl
package main
import (
"bytes"
"flag"
"fmt"
"go/ast"
"go/parser"
"go/token"
"io/ioutil"
@starius
starius / -
Created September 27, 2017 00:52
diff --git a/modules/host/contractmanager/dependencies.go b/modules/host/contractmanager/dependencies.go
index abbd23d..2508e2c 100644
--- a/modules/host/contractmanager/dependencies.go
+++ b/modules/host/contractmanager/dependencies.go
@@ -89,6 +89,7 @@ type (
Sync() error
Truncate(int64) error
WriteAt([]byte, int64) (int, error)
+ Fd() uintptr
}
@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"
)